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:
Ștefan Talpalaru 2022-01-05 23:22:53 +01:00 • committed by GitHub
commit 371e60b17c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 141 additions and 135 deletions

View file

@ -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