Commit adf329a8 authored by Albert Gräf's avatar Albert Gräf
Browse files

Cosmetic change to 'declare' error handling.

If the declare object detects an unrecognized argument which isn't an
option symbol, it will print a weird-looking message complaining about
an empty flag. This commit makes it print a proper warning about an
unrecognized float argument instead.
parent c4495143
......@@ -2237,7 +2237,14 @@ void canvas_declare(t_canvas *x, t_symbol *s, int argc, t_atom *argv)
canvas_stdlib(e, atom_getsymbolarg(i+1, argc, argv)->s_name);
else post("declare: %s: unknown declaration", flag);
// ag: Handle the case of an unrecognized option argument (presumably
// a float).
else if (!*flag) {
post("declare: %g: unknown argument", atom_getfloatarg(i, argc, argv));
else {
post("declare: %s: unknown declaration", flag);
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