We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 98f7dad commit d5c8027Copy full SHA for d5c8027
src/visitor.c
@@ -144,8 +144,8 @@ void remove_trailing_semi(char *str)
144
145
int visitor(char *buffer, env_t *env, history_t *history)
146
{
147
- ast_ctx_t ctx = { 0, .str = buffer, .cap = u_strlen(buffer) + 1,
148
- .ast = malloc(sizeof *ctx.ast * (u_strlen(buffer) + 1)) };
+ ast_ctx_t ctx = { 0, .str = buffer, .cap = u_strlen(buffer) + 10,
+ .ast = malloc(sizeof *ctx.ast * (u_strlen(buffer) + 10)) };
149
ef_t ef = { .buffer = buffer, .env = env,
150
.history = history, .ctx = &ctx, .pout_fd = STDOUT_FILENO,
151
.flags = 0, 0 };
0 commit comments