From 732c626abe986e60ea947bd65cad4a4a1b84e800 Mon Sep 17 00:00:00 2001 From: ggn Date: Thu, 4 May 2017 19:53:48 +0300 Subject: [PATCH] Fix for bug where in alcyon mode the tokenizer would read past the end of the line. --- token.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) 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 -- 2.37.2