handle negative lenght in readBuffer
This commit is contained in:
parent
a61676d10e
commit
6239dd6aba
@ -59,6 +59,8 @@ namespace pxsim.serial {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function readBuffer(length: number) {
|
export function readBuffer(length: number) {
|
||||||
|
if (length <= 0)
|
||||||
|
length = 64;
|
||||||
return pins.createBuffer(length);
|
return pins.createBuffer(length);
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user