diff options
author | Miller Puckette <millerpuckette@users.sourceforge.net> | 2006-08-15 21:57:29 +0000 |
---|---|---|
committer | Miller Puckette <millerpuckette@users.sourceforge.net> | 2006-08-15 21:57:29 +0000 |
commit | a78ef1daec4939e9b12ac2254c5b545dbceebb94 (patch) | |
tree | 865ea2a5e940b9657f6edf9f5317e60fc1e91c3c /pd/src/m_binbuf.c | |
parent | 702ebcc975ddbe560107633676689213f5795f98 (diff) |
Bug fix - plus, two features I couldn't bear to leave out of 0.40
svn path=/trunk/; revision=5616
Diffstat (limited to 'pd/src/m_binbuf.c')
-rw-r--r-- | pd/src/m_binbuf.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/pd/src/m_binbuf.c b/pd/src/m_binbuf.c index fbae4be5..06c3c6a2 100644 --- a/pd/src/m_binbuf.c +++ b/pd/src/m_binbuf.c @@ -490,11 +490,12 @@ t_symbol *binbuf_realizedollsym(t_symbol *s, int ac, t_atom *av, int tonew) * whenever this happened, enable this code */ substr=strchr(str, '$'); - if(substr) - { - strncat(buf2, str, (substr-str)); - str=substr+1; - } + if (!substr || substr-str >= MAXPDSTRING) + return (s); + + strncat(buf2, str, (substr-str)); + str=substr+1; + #endif while((next=binbuf_expanddollsym(str, buf, dollarnull, ac, av, tonew))>=0) @@ -527,6 +528,7 @@ t_symbol *binbuf_realizedollsym(t_symbol *s, int ac, t_atom *av, int tonew) } } done: + post("realize %s->%s", s->s_name, buf2); return (gensym(buf2)); } |