Commit 96403cfc authored by Jonathan Wilkes's avatar Jonathan Wilkes
Browse files

check for argc before dereferencing

parent 5fd4f7be
...@@ -215,7 +215,7 @@ static void initContent_ls_directions(t_def_ls *x,int ac,Atom*av) ...@@ -215,7 +215,7 @@ static void initContent_ls_directions(t_def_ls *x,int ac,Atom*av)
/* if (av[0].a_type == A_LONG) d = av[0].a_w.w_long; /* if (av[0].a_type == A_LONG) d = av[0].a_w.w_long;
else */ else */
if(av[0].a_type == A_FLOAT) d = (long)av[0].a_w.w_float; if(ac && av[0].a_type == A_FLOAT) d = (long)av[0].a_w.w_float;
else { error("define-loudspeakers: dimension NaN"); return; } else { error("define-loudspeakers: dimension NaN"); return; }
if (d==2 || d==3) if (d==2 || d==3)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment