Explorar o código

Fixed very old bug where Streams.GetStreamPosition would return the wrong position --- thanks to Jan Verhoeven for finding this.

dtrg %!s(int64=13) %!d(string=hai) anos
pai
achega
a8ecb11013
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      lang/m2/libm2/Streams.mod

+ 1 - 1
lang/m2/libm2/Streams.mod

@@ -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;