diff --git a/sim/state/serial.ts b/sim/state/serial.ts index ca15f894..bf7f7ed6 100644 --- a/sim/state/serial.ts +++ b/sim/state/serial.ts @@ -59,6 +59,8 @@ namespace pxsim.serial { } export function readBuffer(length: number) { + if (length <= 0) + length = 64; return pins.createBuffer(length); } } \ No newline at end of file