Explorar o código

more chunkSize sanitizing

Alexander Rose %!s(int64=6) %!d(string=hai) anos
pai
achega
f28484319f
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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,