From a8ecb110136f6128f703665d14f61a3e8e58bd83 Mon Sep 17 00:00:00 2001 From: dtrg Date: Wed, 1 Sep 2010 19:55:15 +0000 Subject: [PATCH] Fixed very old bug where Streams.GetStreamPosition would return the wrong position --- thanks to Jan Verhoeven for finding this. --- lang/m2/libm2/Streams.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;