瀏覽代碼

* fixed 2.2.x only hanging when generating case jump tables with a lower border of -2^31

git-svn-id: branches/fixes_2_2@12178 -
florian 17 年之前
父節點
當前提交
557e264149
共有 1 個文件被更改,包括 5 次插入2 次删除
  1. 5 2
      compiler/i386/n386set.pas

+ 5 - 2
compiler/i386/n386set.pas

@@ -91,9 +91,12 @@ implementation
           begin
             if assigned(t^.less) then
               genitem(list,t^.less);
+
             { fill possible hole }
-            for i:=last+1 to t^._low-1 do
-              list.concat(Tai_const.Create_sym(elselabel));
+            { avoid wrap around }
+            if last+1<t^._low then
+              for i:=last+1 to t^._low-1 do
+                list.concat(Tai_const.Create_sym(elselabel));
             for i:=t^._low to t^._high do
               list.concat(Tai_const.Create_sym(blocklabel(t^.blockid)));
             last:=t^._high;