the compiler does not rely on the zero terminator anymore
This commit is contained in:
parent
68a63b3407
commit
7e0540ed80
3 changed files with 13 additions and 14 deletions
|
|
@ -251,7 +251,7 @@ proc `%`*(frmt: FormatStr, args: openArray[Rope]): Rope =
|
|||
while true:
|
||||
j = j * 10 + ord(frmt[i]) - ord('0')
|
||||
inc(i)
|
||||
if frmt[i] notin {'0'..'9'}: break
|
||||
if i >= frmt.len or frmt[i] notin {'0'..'9'}: break
|
||||
num = j
|
||||
if j > high(args) + 1:
|
||||
errorHandler(rInvalidFormatStr, $(j))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue