From: ggn Date: Tue, 20 Dec 2022 19:39:51 +0000 (+0200) Subject: Fix for #199 - stop tokenising after the first symbol when inside a disabled code... X-Git-Tag: v2.2.8^0 X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?p=rmac;a=commitdiff_plain;h=e6e125acd974146ee369ab3613aaafe4df01f614 Fix for #199 - stop tokenising after the first symbol when inside a disabled code blcok --- diff --git a/token.c b/token.c index 89c7f0a..9cbf8b4 100644 --- a/token.c +++ b/token.c @@ -1257,6 +1257,14 @@ DEBUG { printf("TokenizeLine: Calling fpop() from SRC_IFILE...\n"); } if (stuffnull) // Arrange for string termination on next pass nullspot = ln; + if (disabled) + { + // When we are in a disabled code block, the only thing that can break out + // of this is an ".endif" keyword, so this is the minimum we have to parse + // in order to discover such a keyword. + goto goteol; + } + continue; }