Skip to content

Commit

Permalink
pipefs: write with correct offset
Browse files Browse the repository at this point in the history
  • Loading branch information
ffwff committed Sep 9, 2019
1 parent 1a225aa commit 5d09beb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/fs/impl/pipefs.cr
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ private class PipeFSNode < VFSNode
else
# push the message on to the buffer stack
size = min(slice.size, BUFFER_CAPACITY - @buffer_pos)
memcpy(@buffer, slice.to_unsafe, size.to_usize)
memcpy(@buffer + @buffer_pos, slice.to_unsafe, size.to_usize)
@buffer_pos += size
size
end
Expand Down

0 comments on commit 5d09beb

Please sign in to comment.