Fixed crash on invalid syntax in curly braces.

This commit is contained in:
Michael Griebling
2023-02-27 08:11:26 -05:00
parent c1745cc773
commit 8d50c79c91

View File

@@ -226,11 +226,12 @@ public struct MTMathListBuilder {
continue continue
} else if char == "{" { } else if char == "{" {
// this puts us in a recursive routine, and sets oneCharOnly to false and no stop character // this puts us in a recursive routine, and sets oneCharOnly to false and no stop character
let subList = self.buildInternal(false, stopChar: "}") if let subList = self.buildInternal(false, stopChar: "}") {
prevAtom = subList!.atoms.last prevAtom = subList.atoms.last
list.append(subList) list.append(subList)
if oneCharOnly { if oneCharOnly {
return list return list
}
} }
continue continue
} else if char == "}" { } else if char == "}" {