Explorar o código

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

git-svn-id: trunk@40449 -
(cherry picked from commit 90557f2e6203427f135eecf9f56ae8eaab5c1ced)
florian %!s(int64=6) %!d(string=hai) anos
pai
achega
9b2ba834a6
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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