diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-04-10 11:54:09 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-04-10 11:54:09 -0400 |
| commit | ccb9e367047148f5b15316b667a139106858ab61 (patch) | |
| tree | 3ff97768608a244dbb25db1ac9fa1357c3467bfd | |
| parent | 0f9c1f4eb4fcbabec313d13205ef81e47fd8456c (diff) | |
Fix empty string check
| -rw-r--r-- | ast.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -202,7 +202,7 @@ bool is_constant(ast_t *ast) case Bool: case Int: case Num: case Nil: case TextLiteral: return true; case TextJoin: { auto text = Match(ast, TextJoin); - return !text->children->next; + return !text->children || !text->children->next; } case Not: return is_constant(Match(ast, Not)->value); case Negative: return is_constant(Match(ast, Negative)->value); |
