Browse Source

Fixed raw size shift amount computation

git-svn-id: https://svn.inf.ethz.ch/svn/lecturers/a2/trunk@8542 8c9fc860-2736-0410-a75d-ab315db34111
negelef 6 năm trước cách đây
mục cha
commit
d11a7b8a47
3 tập tin đã thay đổi với 3 bổ sung3 xóa
  1. 1 1
      source/IO64.Streams.Mod
  2. 1 1
      source/Streams.Mod
  3. 1 1
      source/Streams64.Mod

+ 1 - 1
source/IO64.Streams.Mod

@@ -671,7 +671,7 @@ TYPE
 		BEGIN
 			n := 0; y := 0; ch := Get( );
 			WHILE ch >= 80X DO INC( y, LSH( SIZE( ORD( ch )) - 128, n )); INC( n, 7 ); ch := Get( ) END;
-			x := ASH( LSH( SIZE( ORD( ch )), SIZE OF SIZE * 8 - 7 ), n - SIZE OF SIZE * 8 - 7 ) + y
+			x := ASH( LSH( SIZE( ORD( ch )), SIZE OF SIZE * 8 - 7 ), n - (SIZE OF SIZE * 8 - 7) ) + y
 		END RawSize;
 
 		(** -- Read formatted data ( uses Peek for one character lookahead ) -- *)

+ 1 - 1
source/Streams.Mod

@@ -693,7 +693,7 @@ TYPE
 		BEGIN
 			n := 0;  y := 0;  ch := Get();
 			WHILE ch >= 80X DO INC( y, LSH( SIZE( ORD( ch ) ) - 128, n ) );  INC( n, 7 );  ch := Get() END;
-			x := ASH( LSH( SIZE( ORD( ch ) ), SIZE OF SIZE * 8 - 7 ), n - SIZE OF SIZE * 8 - 7 ) + y
+			x := ASH( LSH( SIZE( ORD( ch ) ), SIZE OF SIZE * 8 - 7 ), n - (SIZE OF SIZE * 8 - 7) ) + y
 		END RawSize;
 
 		(** -- Read formatted data (uses Peek for one character lookahead) -- *)

+ 1 - 1
source/Streams64.Mod

@@ -685,7 +685,7 @@ TYPE
 		BEGIN
 			n := 0;  y := 0;  ch := Get();
 			WHILE ch >= 80X DO INC( y, LSH( SIZE( ORD( ch ) ) - 128, n ) );  INC( n, 7 );  ch := Get() END;
-			x := ASH( LSH( SIZE( ORD( ch ) ), SIZE OF SIZE * 8 - 7 ), n - SIZE OF SIZE * 8 - 7 ) + y
+			x := ASH( LSH( SIZE( ORD( ch ) ), SIZE OF SIZE * 8 - 7 ), n - (SIZE OF SIZE * 8 - 7) ) + y
 		END RawSize;
 
 		(** -- Read formatted data (uses Peek for one character lookahead) -- *)