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)
committerdtrg <none@none>
Wed, 1 Sep 2010 19:55:15 +0000 (19:55 +0000)
lang/m2/libm2/Streams.mod

index a401337..08b84cf 100644 (file)
@@ -340,7 +340,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;