Browse Source

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

dtrg 13 years ago
parent
commit
072e795aa3
1 changed files with 1 additions and 1 deletions
  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;