Assert we have a buffer

This commit is contained in:
Bryan Ashby 2017-08-19 13:57:02 -06:00
parent 2711f892a2
commit c7ff033737
1 changed files with 5 additions and 0 deletions

View File

@ -459,6 +459,11 @@ function TelnetClient(input, output) {
};
this.dataHandler = function(b) {
if(!Buffer.isBuffer(b)) {
EnigAssert(false, `Cannot push non-buffer ${typeof b}`);
return;
}
bufs.push(b);
let i;