compiler_ropes: remove unnecessary length check
frmt[frmt.len] isn't an out-of-bounds access for strings (!)
This commit is contained in:
parent
71e785904b
commit
d7a42641ab
1 changed files with 1 additions and 1 deletions
|
|
@ -275,7 +275,7 @@ proc `%`*(frmt: TFormatStr, args: openArray[Rope]): Rope =
|
||||||
while true:
|
while true:
|
||||||
j = j * 10 + ord(frmt[i]) - ord('0')
|
j = j * 10 + ord(frmt[i]) - ord('0')
|
||||||
inc(i)
|
inc(i)
|
||||||
if (i >= length) or frmt[i] notin {'0'..'9'}: break
|
if frmt[i] notin {'0'..'9'}: break
|
||||||
num = j
|
num = j
|
||||||
if j > high(args) + 1:
|
if j > high(args) + 1:
|
||||||
errorHandler(rInvalidFormatStr, $(j))
|
errorHandler(rInvalidFormatStr, $(j))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue