mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-07-07 05:06:37 +02:00
Need to zero out the malloced constructor results in case not all
fields are initialized.
This commit is contained in:
parent
3b44424140
commit
ff884b7314
1 changed files with 2 additions and 0 deletions
|
@ -1093,6 +1093,8 @@
|
||||||
"));\n"
|
"));\n"
|
||||||
" r = sexp_cpointer_value(res) = malloc(sizeof("
|
" r = sexp_cpointer_value(res) = malloc(sizeof("
|
||||||
(or (type-struct-type name) "") " " (type-name name) "));\n"
|
(or (type-struct-type name) "") " " (type-name name) "));\n"
|
||||||
|
" memset(r, 0, sizeof("
|
||||||
|
(or (type-struct-type name) "") " " (type-name name) "));\n"
|
||||||
" sexp_freep(res) = 1;\n"
|
" sexp_freep(res) = 1;\n"
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(let lp ((ls args) (i 0))
|
(let lp ((ls args) (i 0))
|
||||||
|
|
Loading…
Add table
Reference in a new issue