From: ggn Date: Thu, 4 May 2017 16:53:48 +0000 (+0300) Subject: Fix for bug where in alcyon mode the tokenizer would read past the end of the line. X-Git-Tag: v2.1.0~125 X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?p=rmac;a=commitdiff_plain;h=732c626abe986e60ea947bd65cad4a4a1b84e800 Fix for bug where in alcyon mode the tokenizer would read past the end of the line. --- diff --git a/token.c b/token.c index 4ec4872..24b7c95 100644 --- a/token.c +++ b/token.c @@ -1303,16 +1303,19 @@ dostring: if (obj_format == ALCYON) { - if ((*(ln + 1) == 'w') || (*(ln + 1) == 'W')) - { - *tk++ = DOTW; - ln += 2; - } - else if ((*(ln + 1) == 'l') || (*(ln + 1) == 'L')) - { - *tk++ = DOTL; - ln += 2; - } + if (*ln == '.') + { + if ((*(ln + 1) == 'w') || (*(ln + 1) == 'W')) + { + *tk++ = DOTW; + ln += 2; + } + else if ((*(ln + 1) == 'l') || (*(ln + 1) == 'L')) + { + *tk++ = DOTL; + ln += 2; + } + } } } else