Skip to content

Commit 72b9251

Browse files
committed
fix unjoin
closes #662
1 parent 05f5e27 commit 72b9251

File tree

1 file changed

+13
-11
lines changed
  • cyclone_objects/binaries/control

1 file changed

+13
-11
lines changed

cyclone_objects/binaries/control/unjoin.c

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,12 @@ static void unjoin_list(t_unjoin *x, t_symbol *s, int ac, t_atom *av)
2525
int length = size * nouts;
2626
int extra = (ac - length);
2727
if(extra > 0){ // extra outlet
28-
if(extra == 1 && av->a_type == A_FLOAT)
29-
outlet_float(x->x_outlets[nouts], (av+length)->a_w.w_float);
30-
else if(av->a_type == A_FLOAT) // if first is float... output list
31-
outlet_list(x->x_outlets[nouts], &s_list, extra, av+length);
28+
if((av+length)->a_type == A_FLOAT){
29+
if(extra == 1)
30+
outlet_float(x->x_outlets[nouts], (av+length)->a_w.w_float);
31+
else
32+
outlet_list(x->x_outlets[nouts], &s_list, extra, av+length);
33+
}
3234
else{
3335
s = atom_getsymbolarg(0, length, av+length);
3436
outlet_anything(x->x_outlets[nouts], s, extra-1, av+length+1);
@@ -39,14 +41,14 @@ static void unjoin_list(t_unjoin *x, t_symbol *s, int ac, t_atom *av)
3941
int j = (i * size);
4042
int n = ac - j;
4143
if(n > 0){
42-
if(n == 1 && av->a_type == A_FLOAT)
43-
outlet_float(x->x_outlets[i], (av+j)->a_w.w_float);
44-
else if(av->a_type == A_FLOAT)
45-
outlet_list(x->x_outlets[i], &s_list, n, av+j);
46-
else{
47-
s = atom_getsymbolarg(0, n, av+j);
48-
outlet_anything(x->x_outlets[i], s, n-1, av+j+1);
44+
if((av+j)->a_type == A_FLOAT){
45+
if(n == 1)
46+
outlet_float(x->x_outlets[i], (av+j)->a_w.w_float);
47+
else
48+
outlet_list(x->x_outlets[i], &s_list, n, av+j);
4949
}
50+
else
51+
outlet_anything(x->x_outlets[i], atom_getsymbol(av+j), n-1, av+j+1);
5052
}
5153
else
5254
n = 0;

0 commit comments

Comments
 (0)