fixed more bugs in mod/ffi.c
This commit is contained in:
parent
8a35a82cfb
commit
4d942a3ae6
@ -328,14 +328,16 @@ static MOO_INLINE int add_ffi_arg (moo_t* moo, ffi_t* ffi, moo_ooch_t fmtc, int
|
|||||||
newmax = ffi->arg_max + 16; /* TODO: adjust this? */
|
newmax = ffi->arg_max + 16; /* TODO: adjust this? */
|
||||||
ttmp = moo_reallocmem(moo, ffi->arg_types, MOO_SIZEOF(*ttmp) * newmax);
|
ttmp = moo_reallocmem(moo, ffi->arg_types, MOO_SIZEOF(*ttmp) * newmax);
|
||||||
if (!ttmp) goto oops;
|
if (!ttmp) goto oops;
|
||||||
|
ffi->arg_types = ttmp;
|
||||||
|
|
||||||
vtmp = moo_reallocmem(moo, ffi->arg_values, MOO_SIZEOF(*vtmp) * newmax);
|
vtmp = moo_reallocmem(moo, ffi->arg_values, MOO_SIZEOF(*vtmp) * newmax);
|
||||||
if (!vtmp) goto oops;
|
if (!vtmp) goto oops;
|
||||||
|
ffi->arg_values = vtmp;
|
||||||
|
|
||||||
stmp = moo_reallocmem(moo, ffi->arg_svs, MOO_SIZEOF(*stmp) * newmax);
|
stmp = moo_reallocmem(moo, ffi->arg_svs, MOO_SIZEOF(*stmp) * newmax);
|
||||||
if (!stmp) goto oops;
|
if (!stmp) goto oops;
|
||||||
|
|
||||||
ffi->arg_types = ttmp;
|
|
||||||
ffi->arg_values = vtmp;
|
|
||||||
ffi->arg_svs = stmp;
|
ffi->arg_svs = stmp;
|
||||||
|
|
||||||
ffi->arg_max = newmax;
|
ffi->arg_max = newmax;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user