瀏覽代碼

* properly calcualte aligncount as proposed by Jeppe, should resolve #33323

git-svn-id: trunk@40449 -
(cherry picked from commit 90557f2e6203427f135eecf9f56ae8eaab5c1ced)
florian 6 年之前
父節點
當前提交
9b2ba834a6
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      rtl/inc/generic.inc

+ 1 - 1
rtl/inc/generic.inc

@@ -59,7 +59,7 @@ begin
         then
         then
         begin
         begin
           { Align on native pointer size }
           { Align on native pointer size }
-          aligncount:=(PtrUInt(pdest) and (sizeof(PtrUInt)-1));
+          aligncount:=(sizeof(PtrUInt)-PtrInt(pdest)) and (sizeof(PtrUInt)-1);
           dec(count,aligncount);
           dec(count,aligncount);
           pend:=psrc+aligncount;
           pend:=psrc+aligncount;
           while psrc<pend do
           while psrc<pend do