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
This commit is contained in:
David Edelsohn 2005-07-12 03:27:40 +00:00 committed by David Edelsohn
parent 020b834ab2
commit 4e402b2ce3
2 changed files with 9 additions and 3 deletions

View File

@ -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>

View File

@ -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)