Selaa lähdekoodia

more chunkSize sanitizing

Alexander Rose 6 vuotta sitten
vanhempi
commit
f28484319f
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  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,