fix: ReadREAL did not work, because ok was'nt initialized
authorceriel <none@none>
Mon, 29 Jun 1987 19:33:01 +0000 (19:33 +0000)
committerceriel <none@none>
Mon, 29 Jun 1987 19:33:01 +0000 (19:33 +0000)
lang/m2/libm2/PascalIO.mod
lang/m2/libm2/catch.c

index ce859a2..b59f731 100644 (file)
@@ -324,6 +324,7 @@ IMPLEMENTATION MODULE PascalIo;
 
   BEGIN
        index := 0;
+       ok := TRUE;
        WHILE NextCHAR(inputtext) IN spaces DO
                Get(inputtext);
        END;
index 42d061b..c1e4c70 100644 (file)
@@ -63,9 +63,8 @@ _catch(trapno)
                do
                        *s++ = i % 10 + '0';
                while (i /= 10);
-               *s = 0;
-               s = buf;
-               while (*p++ = *s++) /* nothing */;
+               while (s > buf) *p++ = *--s;
+               *p = 0;
                Traps_Message(q, 0, (int) (p - q), 1);
        }
        exit(trapno);