From aef05153a220b4518a681edfcbd2f4f555f847bf Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Thu, 9 Apr 2020 22:06:46 -0400 Subject: [PATCH] JavaScript Highlighter: Fix potential infinite loop on bad input --- MongoView/Synax Highlighting/JavaScriptHighlighter.swift | 2 -- 1 file changed, 2 deletions(-) diff --git a/MongoView/Synax Highlighting/JavaScriptHighlighter.swift b/MongoView/Synax Highlighting/JavaScriptHighlighter.swift index bc6fe75..4e88784 100644 --- a/MongoView/Synax Highlighting/JavaScriptHighlighter.swift +++ b/MongoView/Synax Highlighting/JavaScriptHighlighter.swift @@ -225,8 +225,6 @@ class JavaScriptHighlighter { consumeDotLookup() } else if char == "?" { consumeTernaryExpression() - } else if expressionEnds.contains(char) { - return } else { consume() }