summaryrefslogtreecommitdiffstats
path: root/struct.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2020-10-16 06:34:59 -0700
committerKaz Kylheku <kaz@kylheku.com>2020-10-16 06:34:59 -0700
commitcd22aba61b64883e6026cd1fc31cc2f5a426f314 (patch)
treea3ba689cd64a3274b971a7c29762402d50934dd6 /struct.c
parent4df1cb2a5e319c2aa93db7f70c6042868ad552f9 (diff)
downloadtxr-cd22aba61b64883e6026cd1fc31cc2f5a426f314.tar.gz
txr-cd22aba61b64883e6026cd1fc31cc2f5a426f314.tar.bz2
txr-cd22aba61b64883e6026cd1fc31cc2f5a426f314.zip
struct: bad object in two diagnostics.
* struct.c (umethod_fun, umethod_args_fun): The env function is being used as an object, passed to the ~a conversion specifier of the formatter. The correct argument is the sym variable.
Diffstat (limited to 'struct.c')
-rw-r--r--struct.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/struct.c b/struct.c
index 43908f8c..f897a611 100644
--- a/struct.c
+++ b/struct.c
@@ -1702,7 +1702,7 @@ static val umethod_fun(val sym, struct args *args)
if (!args_more(args, 0)) {
uw_throwf(error_s, lit("~a: object argument required to call ~s"),
- self, env, nao);
+ self, sym, nao);
} else {
val strct = args_at(args, 0);
@@ -1726,7 +1726,7 @@ static val umethod_args_fun(val dargs, struct args *args)
if (!args_more(args, 0)) {
uw_throwf(error_s, lit("~a: object argument required to call ~s"),
- self, env, nao);
+ self, sym, nao);
} else {
cnum da_nargs = da->fill + c_num(length(da->list), self);
cnum index = 0;