Merge pull request #2895 from FedeOmoto/devel

Allow to set position at end of stream
This commit is contained in:
Andreas Rumpf
2015-06-10 10:50:58 +02:00

View File

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