Crash on exporting packet #104

This commit is contained in:
Bryan Ashby 2017-03-01 20:02:45 -07:00
parent 02d76f5573
commit be38bbf3c7
2 changed files with 17 additions and 17 deletions

View file

@ -930,8 +930,12 @@ Packet.prototype.writeMessageEntry = function(ws, msgEntry) {
};
Packet.prototype.writeTerminator = function(ws) {
ws.write(new Buffer( [ 0 ] )); // final extra null term
return 1;
//
// From FTS-0001.016:
// "A pseudo-message beginning with the word 0000H signifies the end of the packet."
//
ws.write(new Buffer( [ 0x00, 0x00 ] )); // final extra null term
return 2;
};
Packet.prototype.writeStream = function(ws, messages, options) {