This is an automated email from the ASF dual-hosted git repository.

joshtynjala pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git

commit 107ebb30721e80bd2274436d154fa0a94ca55a90
Author: Josh Tynjala <[email protected]>
AuthorDate: Mon Apr 22 15:45:53 2024 -0700

    CSS.g: fixed crash when EOF is next token after simple selector
---
 .../src/main/antlr3/org/apache/royale/compiler/internal/css/CSS.g  | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git 
a/compiler/src/main/antlr3/org/apache/royale/compiler/internal/css/CSS.g 
b/compiler/src/main/antlr3/org/apache/royale/compiler/internal/css/CSS.g
index 37b631a05..2c118bb30 100644
--- a/compiler/src/main/antlr3/org/apache/royale/compiler/internal/css/CSS.g
+++ b/compiler/src/main/antlr3/org/apache/royale/compiler/internal/css/CSS.g
@@ -172,6 +172,13 @@ private final int endOfSimpleSelector()
     {
         return 0;
     }
+
+    
+    // If the next token is the end of the input, it's also end of a selector.
+    if (nextType == EOF)
+    {
+        return 0;
+    }
     
     return -1;
 }

Reply via email to