diff --git a/externals/cxc/ascseq.c b/externals/cxc/ascseq.c index 2a6e21ca341b964b607a9a28c02f0d7a162d516d..33e8042a61ad83662018a5505dfa13cf3422432d 100644 --- a/externals/cxc/ascseq.c +++ b/externals/cxc/ascseq.c @@ -56,6 +56,11 @@ void ascseq_anything(t_ascseq *x, t_symbol* s, t_int argc, t_atom* argv) len = 0; x->x_bla[0] = '\0'; + if (!s) { // we sent a bang, so report and ignore it) + error("ascseq: ignoring bang message"); + return; + } + //symbol_string(s->s_name, tmp, 1024); if(!strstr(s->s_name,LISTSEL)) { strcat(x->x_bla,s->s_name); diff --git a/externals/cxc/ascwave.c b/externals/cxc/ascwave.c index 9b2031b86f43754bfecdb87fffd6a096a46a3f98..22f85b8522136bec163a67e3064222d169d17710 100644 --- a/externals/cxc/ascwave.c +++ b/externals/cxc/ascwave.c @@ -68,7 +68,7 @@ void ascwave_ft1(t_ascwave *x, t_floatarg g) xip = (char*)malloc((sz+1)*sizeof(char)); xap = (char*)malloc((sz+1)*sizeof(char)); - for (i = 0;i <= sz; ++i) { + for (i = 0; i < sz; ++i) { if (i == sz-1) { xip[i] = lchr; } else { @@ -86,17 +86,21 @@ void ascwave_ft1(t_ascwave *x, t_floatarg g) xap[i] = i % 80 + 33; } // xip[sz] = schr;//'\n'; - xip[sz+1] = '\0'; + xip[sz] = '\0'; //xap[sz] = schr;//'\n'; - xap[sz+1] = '\0'; + xap[sz] = '\0'; // poststring(xip); // post("ft1: %f, %d", x->x_jodel, sz); // outlet_float(x->t_ob.ob_outlet, x->x_jodel + x->x_jodel); outlet_symbol(x->t_ob.ob_outlet, gensym(xip)); - for (i = 0; i < g-2;++i) + for (i = 0; i < g-2;++i) { + fprintf(stderr,"i=%d ", i); outlet_symbol(x->t_ob.ob_outlet, gensym(xap)); - if (g > 1) + } + if (g > 1) { + fprintf(stderr,"g > 1"); outlet_symbol(x->t_ob.ob_outlet, gensym(xip)); + } x->x_jodel = g; free(xip);