diff options
author | Clyybber <darkmine956@gmail.com> | 2020-10-23 03:26:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-23 03:26:50 +0200 |
commit | 01a62320f03ebd3282a7def231351c4f84c319d2 (patch) | |
tree | 13f2747e3c8101f44d20f82255b51a7a36b38511 /lib/pure | |
parent | 2cb484cefb13e4663afd8e0eb2ad81d43f097803 (diff) | |
download | Nim-01a62320f03ebd3282a7def231351c4f84c319d2.tar.gz |
Fix #12410 (#15685)
* Fix #12410, big thanks to @pmetras for this fix * Add testcase
Diffstat (limited to 'lib/pure')
-rw-r--r-- | lib/pure/streams.nim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/pure/streams.nim b/lib/pure/streams.nim index 77f384a79..dc00271a5 100644 --- a/lib/pure/streams.nim +++ b/lib/pure/streams.nim @@ -242,7 +242,7 @@ proc readDataStr*(s: Stream, buffer: var string, slice: Slice[int]): int = result = s.readDataStrImpl(s, buffer, slice) else: # fallback - result = s.readData(addr buffer[0], buffer.len) + result = s.readData(addr buffer[slice.a], slice.b + 1 - slice.a) template jsOrVmBlock(caseJsOrVm, caseElse: untyped): untyped = when nimvm: |