From: nishi Date: Tue, 23 Apr 2024 06:22:51 +0000 (+0000) Subject: parsing segfaults X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=1007ce4cd945b73b6610f70cbde8bd8ea5a2a477;p=serenade.git parsing segfaults git-svn-id: file:///raid/svn-main/nishi-serenade/trunk@16 0f02c867-ac3d-714e-8a88-971ba1f6efcf --- diff --git a/Serenade/parser.c b/Serenade/parser.c index 3fd3b11..a3ae6a2 100644 --- a/Serenade/parser.c +++ b/Serenade/parser.c @@ -116,7 +116,7 @@ struct sn_generic* sn_expr_parse(char* data, unsigned long long size){ gn_stack[br - 1]->tree->op->name = sn_strdup(op_stack[br - 1]); } br_stack[br - 1] = 0; - PUSH_STACK(br - 1); + PUSH_STACK(br - 2); if(br_stack[br - 2] > 0){ int j; struct sn_generic** old_args = gn_stack[br - 2]->tree->args;