diff options
author | David Edelsohn <edelsohn@gnu.org> | 2005-07-12 03:27:40 +0000 |
---|---|---|
committer | David Edelsohn <dje@gcc.gnu.org> | 2005-07-11 23:27:40 -0400 |
commit | 4e402b2ce30ce419aaecfd2db87642c68469ba3d (patch) | |
tree | 0df1b9f9791f3dc3d145d79d880b37e1ebb396ec | |
parent | 020b834ab28006041c583bb43ed3ae1af2c03a01 (diff) | |
download | gcc-4e402b2ce30ce419aaecfd2db87642c68469ba3d.zip gcc-4e402b2ce30ce419aaecfd2db87642c68469ba3d.tar.gz gcc-4e402b2ce30ce419aaecfd2db87642c68469ba3d.tar.bz2 |
re PR libfortran/22412 ([4.0 only] Fortran B edit descriptor error)
PR libgfortran/22412
* io/write.c (otoa): Bias p by SCRATCH_SIZE, not
sizeof (SCRATCH_SIZE).
(btoa): Same.
From-SVN: r101908
-rw-r--r-- | libgfortran/ChangeLog | 6 | ||||
-rw-r--r-- | libgfortran/io/write.c | 6 |
2 files changed, 9 insertions, 3 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index 8457da4..28ee7dc 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,9 @@ +2005-07-11 David Edelsohn <edelsohn@gnu.org> + + PR libgfortran/22412 + * io/write.c (otoa): Bias p by SCRATCH_SIZE, not + sizeof (SCRATCH_SIZE). + (btoa): Same. 2005-07-09 Jerry DeLisle <jvdelisle@verizon.net> diff --git a/libgfortran/io/write.c b/libgfortran/io/write.c index 5603d6d..a24d293 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) |