projects
/
platform
/
upstream
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b2b2fe2
)
[Ada] Fix negative numbers formatted with leading zero
author
Pascal Obry
<obry@adacore.com>
Thu, 16 Sep 2021 14:23:55 +0000
(16:23 +0200)
committer
Pierre-Marie de Rodat
<derodat@adacore.com>
Tue, 5 Oct 2021 08:20:04 +0000
(08:20 +0000)
gcc/ada/
* libgnat/g-forstr.adb (Get_Formatted): Fix computation of the
number of zero to use in the formatted string. This was a wrong
copy/paste.
gcc/ada/libgnat/g-forstr.adb
patch
|
blob
|
history
diff --git
a/gcc/ada/libgnat/g-forstr.adb
b/gcc/ada/libgnat/g-forstr.adb
index
71d17f1
..
d659612
100644
(file)
--- a/
gcc/ada/libgnat/g-forstr.adb
+++ b/
gcc/ada/libgnat/g-forstr.adb
@@
-424,7
+424,7
@@
package body GNAT.Formatted_String is
and then F_Spec.Zero_Pad
and then F_Spec.Width > Len + Value'First - S
then
- Append (Res, String'((F_Spec.Width -
Len + Value'First - S
) * '0'));
+ Append (Res, String'((F_Spec.Width -
(Len + Value'First - S)
) * '0'));
end if;
-- Add the value now