aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEd Kelly <edkelly@users.sourceforge.net>2007-09-28 16:08:32 +0000
committerEd Kelly <edkelly@users.sourceforge.net>2007-09-28 16:08:32 +0000
commita3a69db195528cb7f8270d0883ab4f275709728f (patch)
tree8f4bf1de367e8a14b7ec027becd151f2b62b9925
parent521065056e520553e2a53b617e2ab7a77bc0786a (diff)
This commit was generated by cvs2svn to compensate for changes in r8765,
which included commits to RCS files with non-trunk default branches. svn path=/trunk/externals/ekext/; revision=8766
-rwxr-xr-xmaskxor/maskxor.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/maskxor/maskxor.c b/maskxor/maskxor.c
index e6d1f36..6ebd267 100755
--- a/maskxor/maskxor.c
+++ b/maskxor/maskxor.c
@@ -69,13 +69,19 @@ void maskxor_listl(t_maskxor *x, t_symbol *s, int argc, t_atom *argv)
x->maskxor = 0;
x->lengthm = 0;
}
+ x->lengthm = x->lengthr > x->lengthl ? x->lengthr : x->lengthl;
+ x->maskxor = getbytes(x->lengthm * sizeof(t_atom));
- x->maskxor = copybytes(argv, argc * sizeof(t_atom));
- x->lengthm = x->lengthl;
-
- for(i=0;i<argc;i++)
+ for(i=0;i<x->lengthm;i++)
{
- listl_element = atom_getfloat(argv+i);
+ if(i>=x->lengthm)
+ {
+ listl_element = 0;
+ }
+ else
+ {
+ listl_element = atom_getfloat(argv+i);
+ }
if(listl_element != 0)
{
x->suml++;
@@ -168,7 +174,7 @@ void maskxor_print(t_maskxor *x)
post("maskxor element %d = %f",i,element);
}
}
- post("mode = %f",x->mode);
+ post("mode = %f, lengthl = %d, lengthr = %d, lengthm = %d",x->mode,x->lengthl,x->lengthr,x->lengthm);
}
void *maskxor_new(t_symbol *s, t_floatarg fmode)