diff --git a/main/lib/geom/cpoint_temp.h b/main/lib/geom/cpoint_temp.h index cfd356f6b..030a22c08 100644 --- a/main/lib/geom/cpoint_temp.h +++ b/main/lib/geom/cpoint_temp.h @@ -189,6 +189,10 @@ BEGIN_METHOD(__name##_new, __gtype x; __gtype y; __gtype w; __gtype h) { \ __this->x = VARG(x); \ __this->y = VARG(y); \ + } \ + else if (!MISSING(x) || !MISSING(y)) \ + { \ + GB.Error("Not enough arguments"); \ } \ \ END_METHOD \ diff --git a/main/lib/geom/crect_temp.h b/main/lib/geom/crect_temp.h index 9fb5b31b1..ac8847f96 100644 --- a/main/lib/geom/crect_temp.h +++ b/main/lib/geom/crect_temp.h @@ -53,6 +53,10 @@ BEGIN_METHOD(__name##_new, __gtype x; __gtype y; __gtype w; __gtype h) __this->w = VARG(w); \ __this->h = VARG(h); \ __struct##_normalize(__this); \ + } \ + else if (!MISSING(x) || !MISSING(y) || !MISSING(w) || !MISSING(h)) \ + { \ + GB.Error("Not enough arguments"); \ } \ \ END_METHOD \