Skip to content

Commit

Permalink
fix: do not slice on bufer and data length equal
Browse files Browse the repository at this point in the history
  • Loading branch information
Alan Shaw committed May 7, 2019
1 parent d4020df commit 3def7c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/decode.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ const ReadHandlers = {
const { dataLength } = state
const data = buffer.shallowSlice(0, dataLength)

chunk = buffer.length >= dataLength ? buffer.shallowSlice(dataLength) : null
chunk = buffer.length > dataLength ? buffer.shallowSlice(dataLength) : null
buffer = new BufferList()

return { mode: ReadModes.LENGTH, chunk, buffer, data }
Expand Down

0 comments on commit 3def7c8

Please sign in to comment.