From 665e5e4ff584237c1e3aac97d59995ec8ddda817 Mon Sep 17 00:00:00 2001 From: Miller Puckette Date: Thu, 5 Feb 2009 03:28:27 +0000 Subject: 0.42-4. Fixes "send" template bug, "gfxstub" bug, 2 pd~ bugs svn path=/trunk/; revision=10737 --- pd/extra/pd~/pd~.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'pd/extra/pd~/pd~.c') diff --git a/pd/extra/pd~/pd~.c b/pd/extra/pd~/pd~.c index 3cf713fe..eba594c8 100644 --- a/pd/extra/pd~/pd~.c +++ b/pd/extra/pd~/pd~.c @@ -466,21 +466,16 @@ static void pd_tilde_tick(t_pd_tilde *x) static void pd_tilde_anything(t_pd_tilde *x, t_symbol *s, int argc, t_atom *argv) { - char msgbuf[MAXPDSTRING], *sp, *ep = msgbuf+MAXPDSTRING; + char msgbuf[MAXPDSTRING]; if (!x->x_outfd) return; - msgbuf[0] = 0; - strncpy(msgbuf, s->s_name, MAXPDSTRING); - msgbuf[MAXPDSTRING-1] = 0; - sp = msgbuf + strlen(msgbuf); + fprintf(x->x_outfd, "%s ", s->s_name); while (argc--) { - if (sp < ep-1) - sp[0] = ' ', sp[1] = 0, sp++; - atom_string(argv++, sp, ep-sp); - sp += strlen(sp); + atom_string(argv++, msgbuf, MAXPDSTRING); + fprintf(x->x_outfd, "%s ", msgbuf); } - fprintf(x->x_outfd, "%s;\n", msgbuf); + fprintf(x->x_outfd, ";\n"); } static void *pd_tilde_new(t_symbol *s, int argc, t_atom *argv) -- cgit v1.2.1