From 3ca60345238ef3b0a1927f0461ddf4b484475414 Mon Sep 17 00:00:00 2001 From: florian Date: Sun, 25 Feb 2018 15:32:38 +0000 Subject: [PATCH] * inserted type casts on opr.val again, but depending on the type of opr.val, avoids range check errors git-svn-id: trunk@38341 - --- compiler/raatt.pas | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/compiler/raatt.pas b/compiler/raatt.pas index 4deeffea45..f9aa5dd298 100644 --- a/compiler/raatt.pas +++ b/compiler/raatt.pas @@ -1723,7 +1723,12 @@ unit raatt; else begin 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;