From: dtrg Date: Wed, 1 Sep 2010 19:55:15 +0000 (+0000) Subject: Fixed very old bug where Streams.GetStreamPosition would return the wrong position... X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=81947fbf97bd663d6817ec7a65c3cd0efbc644d3;p=ack.git Fixed very old bug where Streams.GetStreamPosition would return the wrong position --- thanks to Jan Verhoeven for finding this. --- diff --git a/lang/m2/libm2/Streams.mod b/lang/m2/libm2/Streams.mod index 7e123bacb..87e82cb5c 100644 --- a/lang/m2/libm2/Streams.mod +++ b/lang/m2/libm2/Streams.mod @@ -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;