diff options
author | Federico Omoto <federico.omoto@gmail.com> | 2015-06-09 22:25:31 -0300 |
---|---|---|
committer | Federico Omoto <federico.omoto@gmail.com> | 2015-06-09 22:25:31 -0300 |
commit | 4618cb58c069139f95d910f10fed718151e06a9f (patch) | |
tree | d9d99d1a6a2b451f8b15ad6a5835ad719bd91c4c /lib/pure | |
parent | 25a19875172db5024c1edf7011a5b46996e4f543 (diff) | |
download | Nim-4618cb58c069139f95d910f10fed718151e06a9f.tar.gz |
Allow to set position at end of stream
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 e6004b5d0..50b5c219a 100644 --- a/lib/pure/streams.nim +++ b/lib/pure/streams.nim @@ -279,7 +279,7 @@ proc ssAtEnd(s: Stream): bool = proc ssSetPosition(s: Stream, pos: int) = var s = StringStream(s) - s.pos = clamp(pos, 0, s.data.high) + s.pos = clamp(pos, 0, s.data.len) proc ssGetPosition(s: Stream): int = var s = StringStream(s) |