Jelajahi Sumber

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

git-svn-id: trunk@40449 -
(cherry picked from commit 90557f2e6203427f135eecf9f56ae8eaab5c1ced)
florian 6 tahun lalu
induk
melakukan
9b2ba834a6
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      rtl/inc/generic.inc

+ 1 - 1
rtl/inc/generic.inc

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