Allow calling stream.read(0)

This commit is contained in:
Zahary Karadjov 2021-02-18 23:15:59 +02:00
commit 99e89eb1e5
No known key found for this signature in database
GPG key ID: C8936F8A3073D609

View file

@ -821,7 +821,7 @@ template useHeapMem(_: Natural) =
addr buffer[0]
template useStackMem(n: static Natural) =
var buffer: array[n, byte]
var buffer: array[n + 1, byte]
template allocMem(_: Natural): ptr byte =
addr buffer[0]