Fix for bug where in alcyon mode the tokenizer would read past the end of the line.
authorggn <ggn.dbug@gmail.com>
Thu, 4 May 2017 16:53:48 +0000 (19:53 +0300)
committerShamus Hammons <jlhamm@acm.org>
Fri, 5 May 2017 13:29:54 +0000 (08:29 -0500)
token.c

diff --git a/token.c b/token.c
index 4ec487204ea74a6eec2ea0b8a4553e82b4458aaf..24b7c955d6cbe04591fc6d634453b629ec5be9e2 100644 (file)
--- 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