From 28df32eb0d77ddae0810b62f0c3e4ee3495f75c9 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Mon, 3 Jan 2022 14:45:12 +0900 Subject: [PATCH] [gamecode] Use pr_memset instead of memset This keeps things inline and matches the quakec exec loop. Also removes the need to calculate the size. --- libs/gamecode/pr_exec.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/libs/gamecode/pr_exec.c b/libs/gamecode/pr_exec.c index e8c186505..1543d9c59 100644 --- a/libs/gamecode/pr_exec.c +++ b/libs/gamecode/pr_exec.c @@ -2606,15 +2606,13 @@ pr_exec_ruamoko (progs_t *pr, int exitdepth) OP_op_T (GE, U, ulong, ulvec2, ulvec4, >=); //FIXME float shift case OP_MEMSET_I: - memset (op_c, OPA(int), st->b * sizeof (pr_type_t)); + pr_memset (op_c, OPA(int), st->b); break; case OP_MEMSET_P: - memset (pr->pr_globals + OPC(int), OPA(int), - OPB(uint) * sizeof (pr_type_t)); + pr_memset (pr->pr_globals + OPC(int), OPA(int), OPB(uint)); break; case OP_MEMSET_PI: - memset (pr->pr_globals + OPC(int), OPA(int), - st->b * sizeof (pr_type_t)); + pr_memset (pr->pr_globals + OPC(int), OPA(int), st->b); break; // 1 1110 OP_op_T (LE, u, uint, uivec2, uivec4, <=);