From 4618cb58c069139f95d910f10fed718151e06a9f Mon Sep 17 00:00:00 2001 From: Federico Omoto Date: Tue, 9 Jun 2015 22:25:31 -0300 Subject: Allow to set position at end of stream --- lib/pure/streams.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- cgit 1.4.1-2-gfad0