Skip to content

Commit

Permalink
Fix a regression in rev. 5379dfb (fwd backport).
Browse files Browse the repository at this point in the history
We need to use typedmess() in inlet_fwd() so that messages on signal
inlets are forwarded correctly. Previously mess3() was used which only
forwards the selector symbol and nothing else.
  • Loading branch information
agraef committed Jul 25, 2024
1 parent 3df4af7 commit 0f94232
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion pd/src/m_obj.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ behavior for "gobjs" appears at the end of this file. */
#include "m_imp.h"
#include <stdio.h>

#ifdef _WIN32
# include <malloc.h> /* MSVC or mingw on windows */
#elif defined(__linux__) || defined(__APPLE__)
# include <alloca.h> /* linux, mac, mingw, cygwin */
#else
# include <stdlib.h> /* BSDs for example */
#endif

union inletunion
{
t_symbol *iu_symto;
Expand Down Expand Up @@ -86,7 +94,12 @@ static int inlet_fwd(t_inlet *x, t_symbol *s, int argc, t_atom *argv)
if(x->i_symfrom == &s_signal
&& zcheckgetfn(x->i_dest, gensym("fwd"), A_GIMME, A_NULL))
{
mess3i(x->i_dest, gensym("fwd"), s, argc, argv);
t_atom *argvec = (t_atom *)alloca((argc+1) * sizeof(t_atom));
int i;
SETSYMBOL(argvec, s);
for (i = 0; i < argc; i++)
argvec[i+1] = argv[i];
typedmess(x->i_dest, gensym("fwd"), argc+1, argvec);
return 1;
}
return 0;
Expand Down

0 comments on commit 0f94232

Please sign in to comment.