~pixelherodev/zyg

530a485f404c0600253207807d01b366bb969d01 — Noam Preil 5 months ago a66e6a4
[lexer] fix initialization
1 files changed, 2 insertions(+), 0 deletions(-)

M lexer.c
M lexer.c => lexer.c +2 -0
@@ 42,6 42,8 @@ lexer_init(char *path)
	if(ctx.file.buf == NULL)
		FATAL("Failed to read file '%s' for parsing", path);
	ctx.index = 0;
	ctx.tokens.tags = NULL;
	ctx.tokens.strings = NULL;
	c3init(&ctx.tree);
	if(!stb_sb_ensure_capacity(&ctx.tokens.tags, ctx.file.len / 3, 1))
		WARN("Error reserving capacity for tokens!", 0);