Browse Source

* Prevent a range check error in case of big unsigned values.

Yuriy Sydorov 3 years ago
parent
commit
7b2cd0bcdc
1 changed files with 1 additions and 1 deletions
  1. 1 1
      compiler/x86/aoptx86.pas

+ 1 - 1
compiler/x86/aoptx86.pas

@@ -10153,7 +10153,7 @@ unit aoptx86;
                 reference_reset(NewRef, 1, []);
                 reference_reset(NewRef, 1, []);
                 NewRef.base := taicpu(p).oper[1]^.reg;
                 NewRef.base := taicpu(p).oper[1]^.reg;
                 NewRef.scalefactor := 1;
                 NewRef.scalefactor := 1;
-                NewRef.offset := taicpu(p).oper[0]^.val;
+                NewRef.offset := asizeint(taicpu(p).oper[0]^.val);
 
 
                 taicpu(hp1).opcode := A_LEA;
                 taicpu(hp1).opcode := A_LEA;
                 taicpu(hp1).loadref(0, NewRef);
                 taicpu(hp1).loadref(0, NewRef);