Skip to content

Commit 89a3289

Browse files
Merge pull request #69 from cmosgh/master
fix(websockethandler): fix buffer init in handleStandardInput
2 parents ee37f81 + 988be1b commit 89a3289

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

node-client/src/web-socket-handler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export class WebSocketHandler {
4343

4444
public static handleStandardInput(conn: ws.connection, stdin: stream.Readable | any) {
4545
stdin.on('data', (data) => {
46-
const buff = Buffer.from(data.length + 1);;
46+
const buff = Buffer.from(data, data.length + 1);
4747
buff.writeInt8(0, 0);
4848
if (data instanceof Buffer) {
4949
data.copy(buff, 1);

0 commit comments

Comments
 (0)