Skip to content

Commit

Permalink
fs: Push always a new buffer
Browse files Browse the repository at this point in the history
fix jerryscript-project#1974

IoT.js-DCO-1.0-Signed-off-by: Lauri Rooden [email protected]
  • Loading branch information
lauriro committed Aug 13, 2021
1 parent 02599f3 commit 077de37
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/js/fs.js
Original file line number Diff line number Diff line change
Expand Up @@ -449,8 +449,7 @@ try {
// null must be pushed so the 'end' event will be emitted.
self.push(null);
} else {
self.push(bytes_read == self._buff.length ?
self._buff : self._buff.slice(0, bytes_read));
self.push(self._buff.slice(0, bytes_read));
self.doRead();
}
});
Expand Down

0 comments on commit 077de37

Please sign in to comment.