diff options
Diffstat (limited to 'shared')
-rw-r--r-- | shared/common/port.c | 12 | ||||
-rw-r--r-- | shared/toxy/scriptlet.c | 2 |
2 files changed, 8 insertions, 6 deletions
diff --git a/shared/common/port.c b/shared/common/port.c index 556af8f..fa81bc0 100644 --- a/shared/common/port.c +++ b/shared/common/port.c @@ -162,20 +162,22 @@ static int import_obj(t_port *x, char *name) static int import_objarg(t_port *x, char *name) { int ndx = (x->x_inmess[1].a_w.w_symbol == gensym("user") ? 3 : 2); - if (x->x_inatoms > 6) + if (x->x_inatoms > 6 + || (ndx == 3 && x->x_inatoms > 4)) { - t_atom *in = x->x_inmess + 7; - t_atom *out = x->x_outmess; + int nextra; + t_atom *in, *out = x->x_outmess; SETSYMBOL(out, gensym("#X")); out++; SETSYMBOL(out, gensym("obj")); out++; port_setxy(x, ndx, out); binbuf_add(x->x_newbb, 4, x->x_outmess); import_addclassname(x, name, &x->x_inmess[ndx == 2 ? 6 : 2]); out = x->x_outmess; - for (ndx = 7; ndx < x->x_inatoms; ndx++) + for (ndx = 7, nextra = 1, in = x->x_inmess + 7; + ndx < x->x_inatoms; ndx++, nextra++) *out++ = *in++; SETSEMI(out); - binbuf_add(x->x_newbb, x->x_inatoms - 6, x->x_outmess); + binbuf_add(x->x_newbb, nextra, x->x_outmess); x->x_nobj++; return (PORT_NEXT); } diff --git a/shared/toxy/scriptlet.c b/shared/toxy/scriptlet.c index 635c106..9bc312d 100644 --- a/shared/toxy/scriptlet.c +++ b/shared/toxy/scriptlet.c @@ -197,7 +197,7 @@ static char *scriptlet_dedot(t_scriptlet *sp, char *ibuf, char *obuf, if (resolveall) { t_canvas *cv; - if (cv = scriptlet_canvasvalidate(sp, visedonly)) + if (cv = scriptlet_canvasvalidate(sp, 0)) { if (!strncmp(&ibuf[1], "tag", 3)) { |