diff --git a/pd/src/x_connective.c b/pd/src/x_connective.c index d7019ab917e96c01af95b2d09c6c4fdd1911c2b0..a475de003a4ca5842879ccc44e10e1434c0eb7e5 100644 --- a/pd/src/x_connective.c +++ b/pd/src/x_connective.c @@ -579,8 +579,7 @@ static void route_list(t_route *x, t_symbol *sel, int argc, t_atom *argv) if (x->x_type == A_FLOAT || x->x_mixed) { t_float f; - if (!argc) return; - if (argv->a_type != A_FLOAT) + if (!argc || argv->a_type != A_FLOAT) goto try_symbol; f = atom_getfloat(argv); for (nelement = x->x_nelement, e = x->x_vec; nelement--; e++) diff --git a/scripts/regression_tests.pd b/scripts/regression_tests.pd index 640fb378515c11e66ed68a894a7caa15dcf47554..7b6a767d0a70c9f3ba67a36ff0c10d2d51ca8e84 100644 --- a/scripts/regression_tests.pd +++ b/scripts/regression_tests.pd @@ -1,4 +1,4 @@ -#N canvas 126 96 749 571 12; +#N canvas 755 138 749 571 12; #X obj 465 281 r \$0-result; #X obj 212 239 bng 31 250 50 0 empty empty Run_all 39 13 0 12 -262144 -1 -1; @@ -52,6 +52,7 @@ is handy for some binbuf tests.; #X obj 127 172 print Done; #X obj 198 1701 rtest wrap~_compatibility_bug; #X obj 198 1756 rtest select_bang; +#X obj 198 1811 rtest route_reject_bang; #X connect 0 0 27 0; #X connect 1 0 4 0; #X connect 2 0 42 0; @@ -89,3 +90,4 @@ is handy for some binbuf tests.; #X connect 42 3 3 0; #X connect 43 0 44 0; #X connect 45 0 46 0; +#X connect 46 0 47 0; diff --git a/scripts/regression_tests/route_reject_bang.pd b/scripts/regression_tests/route_reject_bang.pd new file mode 100644 index 0000000000000000000000000000000000000000..d9fa2a630346f4efc88df32da5179078d988a039 --- /dev/null +++ b/scripts/regression_tests/route_reject_bang.pd @@ -0,0 +1,25 @@ +#N canvas 402 151 576 493 12; +#X obj 100 33 inlet; +#X msg 21 34 bang; +#X obj 175 128 route bang; +#X obj 101 356 outlet; +#X obj 100 62 trigger bang bang bang; +#X obj 100 252 float; +#X msg 281 188 0; +#X msg 175 95 12; +#X msg 242 187 1; +#X obj 242 161 b; +#X obj 101 311 list append a bang to [route 12] should get output to +the rejection outlet; +#X connect 0 0 4 0; +#X connect 1 0 4 0; +#X connect 2 1 9 0; +#X connect 4 0 5 0; +#X connect 4 1 7 0; +#X connect 4 2 6 0; +#X connect 5 0 10 0; +#X connect 6 0 5 1; +#X connect 7 0 2 0; +#X connect 8 0 5 1; +#X connect 9 0 8 0; +#X connect 10 0 3 0;