Hallo IOhannes, list!
I just experienced a strange behaviour with strcmp and I don't know if that's a bug or correct ...
example:
[list ha ha( | [t l l] | | [strcmp]
should be always 0 !? (because it's the same) but it is only sometimes 0 on my computer ... ? (pd 0.39 - latest zexy cvs)
attached is an example patch ...
LG Georg
#N canvas 128 394 435 310 10; #X obj 108 159 strcmp; #X msg 114 89 list bla bla sdf; #X floatatom 109 222 5 0 0 0 - - -; #X obj 109 116 t l l; #X text 155 220 <- sometimes 0 , sometimes not ?; #X text 43 252 (normal muessts ja immer 0 sein wenns gleich is?); #X connect 0 0 2 0; #X connect 1 0 3 0; #X connect 3 0 0 0; #X connect 3 1 0 1;
Georg Holzmann wrote:
Hallo!
one small correction:
[list ha ha( | [t l l] | | [strcmp]
[list ha ha( from above is always 0 ... but not e.g. [list bla bla sdf( (as in the attached patch)
thanks. actually you discovered a bug with memory-freeing. i wonder, why it didn't crash your pd (like it did with mine)
it is now fixed in the cvs.
basically, in line 73 you have to replace:
if(*str&&*n)freebytes(str, *n);
by
if(*str&&*n)freebytes(*str, *n);
mf.a.sdr IOhannes