summaryrefslogtreecommitdiff
path: root/src/codegen/codegen_stmt.c
diff options
context:
space:
mode:
authorsuresh <sureshkrishnan.ai@gmail.com>2026-01-25 11:24:22 -0500
committersuresh <sureshkrishnan.ai@gmail.com>2026-01-25 11:24:22 -0500
commit0bb69cb67078dfa921b5b8a42275ef31dfbc9a56 (patch)
treeb579695576ae27f7316866b18bd54073f8e2ca1f /src/codegen/codegen_stmt.c
parent0bd7b99fbf813415b9a0217eaa2a4e8f6f74e1ea (diff)
fixed beffer overflow in vector. Added serialize and deserialize in json with vector reading from the struct with json
Diffstat (limited to 'src/codegen/codegen_stmt.c')
-rw-r--r--src/codegen/codegen_stmt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/codegen/codegen_stmt.c b/src/codegen/codegen_stmt.c
index ff8ea46..cba55b4 100644
--- a/src/codegen/codegen_stmt.c
+++ b/src/codegen/codegen_stmt.c
@@ -1519,7 +1519,7 @@ void codegen_node_single(ParserContext *ctx, ASTNode *node, FILE *out)
emit_auto_type(ctx, node->repl_print.expr, node->token, out);
fprintf(out, " _zval = (");
codegen_expression(ctx, node->repl_print.expr, out);
- fprintf(out, "); fprintf(stdout, _z_str(_zval), _zval); fprintf(stdout, "
+ fprintf(out, "); fprintf(stdout, _z_str(_zval), _z_arg(_zval)); fprintf(stdout, "
"\"\\n\"); }\n");
break;
}