Browse Source

* fix range check errors by explicit casts

git-svn-id: trunk@37945 -
florian 7 years ago
parent
commit
1a69c49e81
2 changed files with 2 additions and 2 deletions
  1. 1 1
      compiler/raatt.pas
  2. 1 1
      compiler/x86/rax86att.pas

+ 1 - 1
compiler/raatt.pas

@@ -1718,7 +1718,7 @@ unit raatt;
         else
          begin
            oper.opr.typ:=OPR_CONSTANT;
-           oper.opr.val:=l;
+           oper.opr.val:=aint(l);
          end;
       end;
 

+ 1 - 1
compiler/x86/rax86att.pas

@@ -605,7 +605,7 @@ Implementation
               { Constant memory offset }
               { This must absolutely be followed by (  }
               oper.InitRef;
-              oper.opr.ref.offset:=BuildConstExpression(True,False);
+              oper.opr.ref.offset:=asizeint(BuildConstExpression(True,False));
               if actasmtoken<>AS_LPAREN then
                 Message(asmr_e_invalid_reference_syntax)
               else