diff --git a/compiler/InkParser/InkParser_Logic.cs b/compiler/InkParser/InkParser_Logic.cs index 64152826..e977fa52 100644 --- a/compiler/InkParser/InkParser_Logic.cs +++ b/compiler/InkParser/InkParser_Logic.cs @@ -29,6 +29,9 @@ protected Parsed.Object LogicLine() var result = Expect(afterTilda, "expression after '~'", recoveryRule: SkipToNextLine) as Parsed.Object; + // Prevent further errors, already reported expected expression and have skipped to next line. + if (result == null) return new ContentList(); + // Parse all expressions, but tell the writer off if they did something useless like: // ~ 5 + 4 // And even: