Assert we have a buffer
This commit is contained in:
parent
2711f892a2
commit
c7ff033737
|
@ -459,6 +459,11 @@ function TelnetClient(input, output) {
|
||||||
};
|
};
|
||||||
|
|
||||||
this.dataHandler = function(b) {
|
this.dataHandler = function(b) {
|
||||||
|
if(!Buffer.isBuffer(b)) {
|
||||||
|
EnigAssert(false, `Cannot push non-buffer ${typeof b}`);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
bufs.push(b);
|
bufs.push(b);
|
||||||
|
|
||||||
let i;
|
let i;
|
||||||
|
|
Loading…
Reference in New Issue