[ruamoko] Reset parameters before setting in listener

It's right there in the docs, even (though only on the macro, which I'd
forgotten about). Fixes some nasty corruption.
This commit is contained in:
Bill Currie 2021-12-23 11:17:51 +09:00
parent dad19aa2ad
commit b726c24b05

View file

@ -277,6 +277,7 @@ rua_listener_method (rua_in_cookie_t *cookie, const void *input)
{ {
progs_t *pr = cookie->pr; progs_t *pr = cookie->pr;
PR_PushFrame (pr); PR_PushFrame (pr);
PR_RESET_PARAMS (pr);
P_POINTER (pr, 0) = cookie->data; P_POINTER (pr, 0) = cookie->data;
P_POINTER (pr, 1) = 0; // don't know the method name (selector) P_POINTER (pr, 1) = 0; // don't know the method name (selector)
P_POINTER (pr, 2) = PR_SetPointer (pr, input);//FIXME check input P_POINTER (pr, 2) = PR_SetPointer (pr, input);//FIXME check input