Browse Source

Fix loop in toaru esh highlighter

K. Lange 7 months ago
parent
commit
28f8795bca
1 changed files with 1 additions and 1 deletions
  1. 1 1
      syntax/esh.c

+ 1 - 1
syntax/esh.c

@@ -8,7 +8,7 @@ int esh_variable_qualifier(int c) {
 int paint_esh_variable(struct syntax_state * state) {
 	if (charat() == '{') {
 		paint(1, FLAG_TYPE);
-		while (charat() != '}') paint(1, FLAG_TYPE);
+		while (charat() != '}' && charat() != -1) paint(1, FLAG_TYPE);
 		if (charat() == '}') paint(1, FLAG_TYPE);
 	} else {
 		if (charat() == '?' || charat() == '$' || charat() == '#') {