From 16c3d4332fac56b275ca3c66dcf12573738bdc91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oscar=20Nihlg=C3=A5rd?= Date: Mon, 22 Oct 2018 17:24:14 +0200 Subject: [PATCH] Fix infinite loop with `nim check` (#9448) --- compiler/lexer.nim | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compiler/lexer.nim b/compiler/lexer.nim index f1b51af328..8762bac495 100644 --- a/compiler/lexer.nim +++ b/compiler/lexer.nim @@ -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'}: