Fix infinite loop with nim check (#9448)

This commit is contained in:
Oscar Nihlgård
2018-10-22 17:24:14 +02:00
committed by Andreas Rumpf
parent b613092de8
commit 16c3d4332f

View File

@@ -636,6 +636,8 @@ proc handleHexChar(L: var TLexer, xi: var int) =
else:
lexMessage(L, errGenerated,
"expected a hex digit, but found: " & L.buf[L.bufpos])
# Need to progress for `nim check`
inc(L.bufpos)
proc handleDecChars(L: var TLexer, xi: var int) =
while L.buf[L.bufpos] in {'0'..'9'}: