diff --git a/lang/m2/libm2/PascalIO.mod b/lang/m2/libm2/PascalIO.mod index ce859a27a..b59f7313f 100644 --- a/lang/m2/libm2/PascalIO.mod +++ b/lang/m2/libm2/PascalIO.mod @@ -324,6 +324,7 @@ IMPLEMENTATION MODULE PascalIo; BEGIN index := 0; + ok := TRUE; WHILE NextCHAR(inputtext) IN spaces DO Get(inputtext); END; diff --git a/lang/m2/libm2/catch.c b/lang/m2/libm2/catch.c index 42d061b5d..c1e4c70c4 100644 --- a/lang/m2/libm2/catch.c +++ b/lang/m2/libm2/catch.c @@ -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);