Fixed very old bug where Streams.GetStreamPosition would return the wrong position...
authordtrg <none@none>
Wed, 1 Sep 2010 19:55:15 +0000 (19:55 +0000)
committerNick Downing <nick@ndcode.org>
Wed, 17 Apr 2019 14:15:20 +0000 (00:15 +1000)
lang/m2/libm2/Streams.mod

index 7e123ba..87e82cb 100644 (file)
@@ -341,7 +341,7 @@ IMPLEMENTATION MODULE Streams;
                RETURN;
        END;
        IF s^.mode = reading THEN
-               position := position + LONG(s^.maxcnt - s^.cnt + 1);
+               position := position - LONG(s^.maxcnt - s^.cnt + 1);
        END;
   END GetPosition;