Skip to content

Commit bd8c0c4

Browse files
committed
forgot write doesnt return buffer
1 parent 0d94a21 commit bd8c0c4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/BinaryStream.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,9 @@ class BinaryStream {
623623
* @return {BinaryStream}
624624
*/
625625
writeString(v){
626-
this.append(Buffer.alloc(v.length).write(v, "utf8"));
626+
let buf = Buffer.alloc(v.length);
627+
buf.write(v, 0, v.length, "utf8");
628+
this.append(buf);
627629
return this;
628630
}
629631

0 commit comments

Comments
 (0)