Просмотр исходного кода

* InstanceSize must be rounded up to sizeof(Pointer) everywhere, fixes #14348

git-svn-id: trunk@13548 -
sergei 16 лет назад
Родитель
Сommit
d6244f680a
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      packages/fcl-xml/src/dom.pp

+ 1 - 1
packages/fcl-xml/src/dom.pp

@@ -2060,7 +2060,7 @@ constructor TDOMDocument.Create;
 begin
 begin
   inherited Create(nil);
   inherited Create(nil);
   FOwnerDocument := Self;
   FOwnerDocument := Self;
-  FMaxPoolSize := TDOMAttr.InstanceSize + sizeof(Pointer);
+  FMaxPoolSize := (TDOMAttr.InstanceSize + sizeof(Pointer)-1) and not (sizeof(Pointer)-1) + sizeof(Pointer);
   FPools := AllocMem(FMaxPoolSize);
   FPools := AllocMem(FMaxPoolSize);
   FNames := THashTable.Create(256, True);
   FNames := THashTable.Create(256, True);
   SetLength(FNamespaces, 3);
   SetLength(FNamespaces, 3);