소스 검색

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

git-svn-id: trunk@39954 -
yury 7 년 전
부모
커밋
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;