commit ad59c52f9d2bc138dc98c08e94309514a97b92b4
parent 7efa977077c8e24c81d5b9a0e384ccfc7efd4d25
Author: Bor Grošelj Simić <bor.groseljsimic@telemach.net>
Date: Tue, 22 Feb 2022 23:22:03 +0100
zero out ident in parse_identifier
Signed-off-by: Bor Grošelj Simić <bor.groseljsimic@telemach.net>
Diffstat:
1 file changed, 1 insertion(+), 0 deletions(-)
diff --git a/src/parse.c b/src/parse.c
@@ -108,6 +108,7 @@ parse_identifier(struct lexer *lexer, struct identifier *ident, bool trailing)
{
struct token tok = {0};
struct identifier *i = ident;
+ *ident = (struct identifier){0};
bool found_trailing = false;
while (!i->name) {
switch (lex(lexer, &tok)) {