diff options
author | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2010-05-13 18:14:37 +0000 |
---|---|---|
committer | IOhannes m zmölnig <zmoelnig@iem.at> | 2015-10-14 13:53:22 +0200 |
commit | d3d4cd4159fea5aaee2f4e381cdadfabaa42203c (patch) | |
tree | f3c8eb1112abe08aa08aa93df41f5c3ecb4c28e0 | |
parent | c7d3de6bedb7ac8f4797958b2d76b8af7b27afd4 (diff) |
fixed set message with patch from Lorenzo on the pd-list
svn path=/trunk/externals/maxlib/; revision=13528
-rw-r--r-- | timebang.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -76,17 +76,17 @@ static void timebang_tick(t_timebang *x) static void timebang_set(t_timebang *x, t_symbol *s, int ac, t_atom *av)
{
- int i;
+ int i, j;
if(ac == x->x_notimes * 3)
{
- for(i = 0; i < ac; i += 3)
+ for(i = 0, j = 0; i < ac; i += 3, j++)
{
- if (av[i].a_type == A_FLOAT) x->x_hour[x->x_notimes] = av[i].a_w.w_float;
+ if (av[i].a_type == A_FLOAT) x->x_hour[j] = av[i].a_w.w_float;
else { post ("timebang: first argument must be (int) hours"); return; }
- if (av[i+1].a_type == A_FLOAT) x->x_min[x->x_notimes] = av[i+1].a_w.w_float;
+ if (av[i+1].a_type == A_FLOAT) x->x_min[j] = av[i+1].a_w.w_float;
else { post ("timebang: second argument must be (int) minutes"); return; }
- if (av[i+2].a_type == A_FLOAT) x->x_sec[x->x_notimes] = av[i+2].a_w.w_float;
+ if (av[i+2].a_type == A_FLOAT) x->x_sec[j] = av[i+2].a_w.w_float;
else { post ("timebang: third argument must be (int) seconds"); return; }
x->x_over[i] = 0;
}
|