fix Floatbuffer.reserve
This commit is contained in:
parent
5476cf4c39
commit
e378e2f1f8
|
@ -19,7 +19,7 @@ let reserve t new_len =
|
||||||
if capacity < new_len then
|
if capacity < new_len then
|
||||||
begin
|
begin
|
||||||
let array = Array1.create Float32 C_layout (capacity * 2) in
|
let array = Array1.create Float32 C_layout (capacity * 2) in
|
||||||
Array1.blit t.array array;
|
Array1.blit t.array (Array1.sub array 0 capacity);
|
||||||
t.array <- array;
|
t.array <- array;
|
||||||
end;
|
end;
|
||||||
t.length <- new_len;
|
t.length <- new_len;
|
||||||
|
|
Loading…
Reference in New Issue