浏览代码

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

git-svn-id: trunk@42741 -
pierre 6 年之前
父节点
当前提交
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