Commit 6631ce98 authored by pokergaming's avatar pokergaming
Browse files

fixed some stray memory allocation errors

parent a2865dc6
......@@ -1136,9 +1136,11 @@ void *svg_new(t_pd *parent, t_symbol *s, int argc, t_atom *argv)
x->x_type == gensym("ellipse"))
{
nxy = 4;
if (argc > 4) argc = 4;
}
x->x_nargs = nxy;
}
post("nxy is %d", nxy);
x->x_vec = (t_fielddesc *)t_getbytes(nxy * sizeof(t_fielddesc));
if (x->x_type == gensym("rect") ||
x->x_type == gensym("circle") ||
......@@ -1202,9 +1204,10 @@ void *svg_new(t_pd *parent, t_symbol *s, int argc, t_atom *argv)
x->x_ndash = 0;
x->x_strokedasharray =
(t_fielddesc *)t_getbytes(1 * sizeof(t_fielddesc));
(t_fielddesc *)t_getbytes(x->x_ndash * sizeof(t_fielddesc));
x->x_transform_n = 0;
x->x_transform = (t_fielddesc *)t_getbytes(1 * sizeof(t_fielddesc));
x->x_transform = (t_fielddesc *)t_getbytes(x->x_transform_n *
sizeof(t_fielddesc));
return (x);
}
......
Markdown is supported
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