From c75ca9d95e8ff7883bd1f193f3723e2a9f76271a Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Wed, 13 Apr 2016 06:21:30 -0700 Subject: Broken argument handling in umethod. * struct.c (umethod_fun): Use proper args interfaces to check whether there is an object argument, and to extract it. --- struct.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'struct.c') diff --git a/struct.c b/struct.c index 1eeb79e6..cdd09dd3 100644 --- a/struct.c +++ b/struct.c @@ -932,11 +932,12 @@ static val umethod_fun(val sym, struct args *args) { val self = lit("umethod"); - if (args->argc == 0) { + if (!args_more(args, 0)) { uw_throwf(error_s, lit("~a: object argument required to call ~s"), self, env, nao); } else { - val strct = args->arg[0]; + val strct = args_at(args, 0); + struct struct_inst *si = struct_handle(strct, self); if (symbolp(sym)) { -- cgit v1.2.3