2
0
Эх сурвалжийг харах

* fixed growing a tbitset when adding an element whose index equals the
datasize (and grow with 16 bytes at a time instead of with only
exactly as many bytes as required to accomodate the new element)

git-svn-id: trunk@15603 -

Jonas Maebe 15 жил өмнө
parent
commit
c072eb5a34
1 өөрчлөгдсөн 2 нэмэгдсэн , 2 устгасан
  1. 2 2
      compiler/cclasses.pas

+ 2 - 2
compiler/cclasses.pas

@@ -2834,7 +2834,7 @@ end;
         { don't use bitpacked array, not endian-safe }
         dataindex:=index shr 3;
         if (dataindex>=datasize) then
-          grow(dataindex);
+          grow(dataindex+16);
         fdata[dataindex]:=fdata[dataindex] or (1 shl (index and 7));
       end;
 
@@ -2857,7 +2857,7 @@ end;
         dataindex:=index shr 3;
         result:=
           (dataindex<datasize) and
-          (((fdata[index shr 3] shr (index and 7)) and 1)<>0);
+          (((fdata[dataindex] shr (index and 7)) and 1)<>0);
       end;