2
0
Эх сурвалжийг харах

Avoid range check error for avr/i8086 CPU by changing local variable dist type to asizeuint

git-svn-id: trunk@42741 -
pierre 6 жил өмнө
parent
commit
8fd0a27875
1 өөрчлөгдсөн 2 нэмэгдсэн , 2 устгасан
  1. 2 2
      compiler/ncgset.pas

+ 2 - 2
compiler/ncgset.pas

@@ -1146,7 +1146,7 @@ implementation
       var
          oldflowcontrol: tflowcontrol;
          i : longint;
-         dist : aword;
+         dist : asizeuint;
          distv,
          lv,hv,
          max_label: tconstexprint;
@@ -1235,7 +1235,7 @@ implementation
                    if distv>=0 then
                      dist:=distv.uvalue
                    else
-                     dist:=aword(-distv.svalue);
+                     dist:=asizeuint(-distv.svalue);
 
                    { optimize for size ? }
                    if cs_opt_size in current_settings.optimizerswitches  then