diff options
author | dje <dje@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-07-12 03:27:40 +0000 |
---|---|---|
committer | dje <dje@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-07-12 03:27:40 +0000 |
commit | 344d23de2cc480000fe7d21a0b944097ec37216b (patch) | |
tree | 0df1b9f9791f3dc3d145d79d880b37e1ebb396ec /libgfortran/io/write.c | |
parent | 59070333c05dd07c6c149a402dd43091ec67ab4f (diff) | |
download | ppe42-gcc-344d23de2cc480000fe7d21a0b944097ec37216b.tar.gz ppe42-gcc-344d23de2cc480000fe7d21a0b944097ec37216b.zip |
PR libgfortran/22412
* io/write.c (otoa): Bias p by SCRATCH_SIZE, not
sizeof (SCRATCH_SIZE).
(btoa): Same.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@101908 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran/io/write.c')
-rw-r--r-- | libgfortran/io/write.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libgfortran/io/write.c b/libgfortran/io/write.c index 5603d6d91fb..a24d29321d6 100644 --- a/libgfortran/io/write.c +++ b/libgfortran/io/write.c @@ -1004,13 +1004,13 @@ otoa (GFC_UINTEGER_LARGEST n) return scratch; } - p = scratch + sizeof (SCRATCH_SIZE) - 1; + p = scratch + SCRATCH_SIZE - 1; *p-- = '\0'; while (n != 0) { *p = '0' + (n & 7); - p -- ; + p--; n >>= 3; } @@ -1032,7 +1032,7 @@ btoa (GFC_UINTEGER_LARGEST n) return scratch; } - p = scratch + sizeof (SCRATCH_SIZE) - 1; + p = scratch + SCRATCH_SIZE - 1; *p-- = '\0'; while (n != 0) |