re PR libfortran/22412 ([4.0 only] Fortran B edit descriptor error)
authorDavid Edelsohn <edelsohn@gnu.org>
Tue, 12 Jul 2005 03:27:40 +0000 (03:27 +0000)
committerDavid Edelsohn <dje@gcc.gnu.org>
Tue, 12 Jul 2005 03:27:40 +0000 (23:27 -0400)
        PR libgfortran/22412
        * io/write.c (otoa): Bias p by SCRATCH_SIZE, not
        sizeof (SCRATCH_SIZE).
        (btoa): Same.

From-SVN: r101908

libgfortran/ChangeLog
libgfortran/io/write.c

index 8457da4a5fe4ed69005691a803b9e23233ef6e11..28ee7dc0cc0c2eba0120c69dec3ba8a2c3bda6b4 100644 (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>
 
index 5603d6d91fb0082d63a37bbc650edbbb14ad7492..a24d29321d6003f38cbebff4db02d1af6e6f756b 100644 (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)