Explorar el Código

* inserted type casts on opr.val again, but depending on the type of opr.val, avoids range check errors

git-svn-id: trunk@38341 -
florian hace 7 años
padre
commit
3ca6034523
Se han modificado 1 ficheros con 6 adiciones y 1 borrados
  1. 6 1
      compiler/raatt.pas

+ 6 - 1
compiler/raatt.pas

@@ -1723,7 +1723,12 @@ unit raatt;
         else
         else
          begin
          begin
            oper.opr.typ:=OPR_CONSTANT;
            oper.opr.typ:=OPR_CONSTANT;
-           oper.opr.val:=l;
+           { cast properly to avoid a range check error }
+{$if defined(AVR) or defined(i8086)}
+           oper.opr.val:=longint(l);
+{$else}
+           oper.opr.val:=aint(l);
+{$endif}
          end;
          end;
       end;
       end;