Another fix for unsafe streams

This commit is contained in:
Zahary Karadjov 2020-05-25 03:59:31 +03:00
commit 5437bba3ce
No known key found for this signature in database
GPG key ID: C8936F8A3073D609

View file

@ -325,7 +325,7 @@ template withReadableRange*(sp: InputStream|AsyncInputStream,
finally: finally:
s.vtable = vtable s.vtable = vtable
s.span.endAddr = origEndAddr s.span.endAddr = origEndAddr
restoreEof(s.buffers, origEof) if s.buffers != nil: restoreEof(s.buffers, origEof)
let fileInputVTable = InputStreamVTable( let fileInputVTable = InputStreamVTable(
readSync: proc (s: InputStream, dst: pointer, dstLen: Natural): Natural readSync: proc (s: InputStream, dst: pointer, dstLen: Natural): Natural