CI: test with multiple Nim versions (#23)
* CI: test with multiple Nim versions * fix readIntoExImpl() when premature EOF is triggered on some Windows versions * also fix some unrelated pointer math
This commit is contained in:
parent
c653d05f27
commit
371e60b17c
5 changed files with 141 additions and 135 deletions
|
|
@ -796,6 +796,9 @@ template readIntoExImpl(s: InputStream,
|
|||
var adjustedDst = offset(dst, totalBytesDrained)
|
||||
|
||||
while true:
|
||||
if s.vtable.isNil():
|
||||
break
|
||||
|
||||
let newBytesRead = awaiter s.vtable.readOp(s, adjustedDst, bytesDeficit)
|
||||
|
||||
s.spanEndPos += newBytesRead
|
||||
|
|
@ -808,7 +811,7 @@ template readIntoExImpl(s: InputStream,
|
|||
if bytesDeficit == 0:
|
||||
break
|
||||
|
||||
adjustedDst = offset(dst, newBytesRead)
|
||||
adjustedDst = offset(adjustedDst, newBytesRead)
|
||||
|
||||
dstLen - bytesDeficit
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue