mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +00:00
[ruamoko] Implement obj_calloc correctly
Forgetting to multiply by the second term leads to not good things.
This commit is contained in:
parent
63caa5794d
commit
17871b979d
1 changed files with 1 additions and 1 deletions
|
@ -1489,7 +1489,7 @@ rua_obj_realloc (progs_t *pr)
|
||||||
static void
|
static void
|
||||||
rua_obj_calloc (progs_t *pr)
|
rua_obj_calloc (progs_t *pr)
|
||||||
{
|
{
|
||||||
int size = P_INT (pr, 0) * sizeof (pr_type_t);
|
int size = P_INT (pr, 0) * P_INT (pr, 1) * sizeof (pr_type_t);
|
||||||
void *mem = PR_Zone_Malloc (pr, size);
|
void *mem = PR_Zone_Malloc (pr, size);
|
||||||
|
|
||||||
memset (mem, 0, size);
|
memset (mem, 0, size);
|
||||||
|
|
Loading…
Reference in a new issue