From beb2211b63b4b80ee07a807e5ffdd441aeea6354 Mon Sep 17 00:00:00 2001 From: Miller Puckette Date: Sat, 3 Jun 2006 19:13:08 +0000 Subject: FFT package selection Zmoelnig's multi-'$' patch big-soundfile support Patch to set open directories (openpanel, savepanel) patch to allow funny characters in extern names fixed makefile.in to support intel mac svn path=/trunk/; revision=5164 --- pd/src/m_atom.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'pd/src/m_atom.c') diff --git a/pd/src/m_atom.c b/pd/src/m_atom.c index 8ba13131..95e2216c 100644 --- a/pd/src/m_atom.c +++ b/pd/src/m_atom.c @@ -88,8 +88,7 @@ void atom_string(t_atom *a, char *buf, unsigned int bufsize) int quote; for (sp = a->a_w.w_symbol->s_name, len = 0, quote = 0; *sp; sp++, len++) if (*sp == ';' || *sp == ',' || *sp == '\\' || - (*sp == '$' && sp == a->a_w.w_symbol->s_name && sp[1] >= '0' - && sp[1] <= '9')) + (*sp == '$' && sp[1] >= '0' && sp[1] <= '9')) quote = 1; if (quote) { @@ -98,7 +97,7 @@ void atom_string(t_atom *a, char *buf, unsigned int bufsize) while (bp < ep && *sp) { if (*sp == ';' || *sp == ',' || *sp == '\\' || - (*sp == '$' && bp == buf && sp[1] >= '0' && sp[1] <= '9')) + (*sp == '$' && sp[1] >= '0' && sp[1] <= '9')) *bp++ = '\\'; *bp++ = *sp++; } @@ -121,7 +120,8 @@ void atom_string(t_atom *a, char *buf, unsigned int bufsize) sprintf(buf, "$%d", a->a_w.w_index); break; case A_DOLLSYM: - sprintf(buf, "$%s", a->a_w.w_symbol->s_name); + snprintf(buf, bufsize-1, "%s", a->a_w.w_symbol->s_name); + buf[bufsize-1] = 0; break; default: bug("atom_string"); -- cgit v1.2.1