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-Tag: release-6-0-pre-5~54 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=a8ecb110136f6128f703665d14f61a3e8e58bd83;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 a40133757..08b84cf4d 100644 --- a/lang/m2/libm2/Streams.mod +++ b/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;