Skip to content

Commit

Permalink
fix(websockethandler): fix buffer init in handleStandardInput
Browse files Browse the repository at this point in the history
  • Loading branch information
cmosgh committed Aug 2, 2018
1 parent 85b010a commit 0fad2e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion node-client/src/web-socket-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export class WebSocketHandler {

public static handleStandardInput(conn: ws.connection, stdin: stream.Readable | any) {
stdin.on('data', (data) => {
const buff = Buffer.from(data.length + 1);;
const buff = Buffer.from(data, data.length + 1);
buff.writeInt8(0, 0);
if (data instanceof Buffer) {
data.copy(buff, 1);
Expand Down

0 comments on commit 0fad2e5

Please sign in to comment.