fix memFileInput.pos return negative value (#16)

This commit is contained in:
andri lim 2021-02-18 22:56:17 +07:00 • committed by GitHub
commit 367cb55eef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 0 deletions

View file

@ -205,6 +205,7 @@ proc memFileInput*(filename: string, mappedSize = -1, offset = 0): InputStreamHa
span: PageSpan(
startAddr: head,
endAddr: offset(head, mappedSize)),
spanEndPos: mappedSize,
file: memFile)
except OSError as err:
raise newException(IOError, err.msg, err)