Sfoglia il codice sorgente

more chunkSize sanitizing

Alexander Rose 6 anni fa
parent
commit
f28484319f
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      src/mol-data/util/chunked-array.ts

+ 1 - 1
src/mol-data/util/chunked-array.ts

@@ -144,7 +144,7 @@ namespace ChunkedArray {
             ctor,
             elementSize,
 
-            growBy: Math.floor(chunkSize),
+            growBy: Math.max(1, Math.ceil(chunkSize)),
             allocatedSize: 0,
             elementCount: 0,