Skip to content

Commit 5900038

Browse files
lkdvosJutho
andcommitted
Update src/implementation/allocator.jl
Co-authored-by: Jutho <Jutho@users.noreply.github.com>
1 parent 5fe8b79 commit 5900038

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/implementation/allocator.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,8 +261,8 @@ function tensoralloc(
261261
isempty(buffer) && sizehint!(buffer, buffer.max_offset)
262262

263263
# Use pointer if there is enough space
264-
ptr = convert(Ptr{T}, pointer(buffer, buffer.offset))
265264
if offset < length(buffer)
265+
ptr = convert(Ptr{T}, pointer(buffer, buffer.offset))
266266
buffer.offset = offset
267267
return Base.unsafe_wrap(Array, ptr, structure)
268268
end

0 commit comments

Comments
 (0)