浏览代码

* Fixed overflow error for the qword version of align() when i=0.

git-svn-id: trunk@39954 -
yury 6 年之前
父节点
当前提交
e60a5ebfe7
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      compiler/cutils.pas

+ 1 - 1
compiler/cutils.pas

@@ -377,7 +377,7 @@ implementation
     }
       begin
         { for 0 and 1 no aligning is needed }
-        if a<=1 then
+        if (a<=1) or (i=0) then
           result:=i
         else
           result:=((i-1+a) div a) * a;