]> Nishi Git Mirror - serenade.git/commitdiff
parsing segfaults
authornishi <nishi@0f02c867-ac3d-714e-8a88-971ba1f6efcf>
Tue, 23 Apr 2024 06:22:51 +0000 (06:22 +0000)
committernishi <nishi@0f02c867-ac3d-714e-8a88-971ba1f6efcf>
Tue, 23 Apr 2024 06:22:51 +0000 (06:22 +0000)
git-svn-id: file:///raid/svn-main/nishi-serenade/trunk@16 0f02c867-ac3d-714e-8a88-971ba1f6efcf

Serenade/parser.c

index 3fd3b11999f5a157abc2c4a06ee99f8d987dfdca..a3ae6a215b0116910eac03d8c30348e74f88ef2b 100644 (file)
@@ -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;