mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-06-08 21:54:36 +02:00
Assert we have a buffer
This commit is contained in:
parent
2711f892a2
commit
c7ff033737
1 changed files with 5 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue