Commit 4129a24a authored by Jonathan Wilkes's avatar Jonathan Wilkes
Browse files

fix return type error and replace assignment with equality check

parent 84d39f9a
......@@ -7041,8 +7041,8 @@ static void *drawsymbol_new(t_symbol *classsym, t_int argc, t_atom *argv)
the user can display any field with any creator to cause
subtle widgetbehavior errors down the line. */
if (classsym == gensym("drawnumber")) x->x_wanttype = DT_FLOAT;
else if (classsym = gensym("drawsymbol")) x->x_wanttype = DT_SYMBOL;
else if (classsym = gensym("drawtext")) x->x_wanttype = DT_TEXT;
else if (classsym == gensym("drawsymbol")) x->x_wanttype = DT_SYMBOL;
else if (classsym == gensym("drawtext")) x->x_wanttype = DT_TEXT;
else
{
pd_error(x, "drawnumber: unknown type");
......@@ -7291,7 +7291,6 @@ static void drawsymbol_vis(t_gobj *z, t_glist *glist, t_glist *parentglist,
int dummy, gottype;
gottype = drawsymbol_gettype(x, data, template, &dummy);
int i = x->x_wanttype != gottype;
if (x->x_wanttype != gottype)
{
pd_error(x, "%s: expected %s field but '%s' is a %s field",
......@@ -7473,7 +7472,7 @@ static int drawsymbol_click(t_gobj *z, t_glist *glist,
{
t_drawsymbol *x = (t_drawsymbol *)z;
if (x->x_typerror) return;
if (x->x_typerror) return (0);
int x1, y1, x2, y2, type, onset;
drawsymbol_getrect(z, glist,
......
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