summary refs log tree commit diff stats
path: root/compiler/ropes.nim
diff options
context:
space:
mode:
authorJacek Sieka <arnetheduck@gmail.com>2015-04-03 23:21:19 +0800
committerJacek Sieka <arnetheduck@gmail.com>2015-04-03 23:21:19 +0800
commitd7a42641ab66c3f785f179fe86846c3c92cb9739 (patch)
treea1f27b3a7f8458d66a1994f559b93162a9213ecc /compiler/ropes.nim
parent71e785904b09da332c6f8c114c1cc62baee23dea (diff)
downloadNim-d7a42641ab66c3f785f179fe86846c3c92cb9739.tar.gz
compiler_ropes: remove unnecessary length check
frmt[frmt.len] isn't an out-of-bounds access for strings (!)
Diffstat (limited to 'compiler/ropes.nim')
-rw-r--r--compiler/ropes.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/ropes.nim b/compiler/ropes.nim
index 194b52bb2..160b1a4c6 100644
--- a/compiler/ropes.nim
+++ b/compiler/ropes.nim
@@ -275,7 +275,7 @@ proc `%`*(frmt: TFormatStr, args: openArray[Rope]): Rope =
         while true:
           j = j * 10 + ord(frmt[i]) - ord('0')
           inc(i)
-          if (i >= length) or frmt[i] notin {'0'..'9'}: break
+          if frmt[i] notin {'0'..'9'}: break
         num = j
         if j > high(args) + 1:
           errorHandler(rInvalidFormatStr, $(j))