aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/tokenizer.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/tokenizer.c b/src/tokenizer.c
index b9f0ad3..e03b441 100644
--- a/src/tokenizer.c
+++ b/src/tokenizer.c
@@ -212,8 +212,7 @@ int tokenizer_consume_if(Tokenizer *self, Token expected_token, bool *result) {
if(!self->needs_update) {
*result = (self->token == expected_token);
- if(*result)
- self->needs_update = bool_true;
+ self->needs_update = *result;
return TOKENIZER_OK;
}