diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index 8457da4a5fe..28ee7dc0cc0 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,9 @@ +2005-07-11 David Edelsohn + + PR libgfortran/22412 + * io/write.c (otoa): Bias p by SCRATCH_SIZE, not + sizeof (SCRATCH_SIZE). + (btoa): Same. 2005-07-09 Jerry DeLisle 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)