summaryrefslogtreecommitdiffstats
path: root/match.c
diff options
context:
space:
mode:
Diffstat (limited to 'match.c')
-rw-r--r--match.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/match.c b/match.c
index db21e044..3735b07a 100644
--- a/match.c
+++ b/match.c
@@ -1236,16 +1236,11 @@ val format_field(val obj, val modifier, val filter, val eval_fun)
val from = funcall1(eval_fun, second(arg_expr));
val to = funcall1(eval_fun, third(arg_expr));
- obj = if3((vectorp(obj)),
- sub_vec(obj, from, to),
- sub_list(obj, from, to));
+ obj = sub(obj, from, to);
} else {
val arg = funcall1(eval_fun, arg_expr);
if (bignump(arg) || fixnump(arg)) {
- if (vectorp(obj))
- obj = vecref(obj, arg);
- else
- obj = listref(obj, arg);
+ obj = ref(obj, arg);
} else {
uw_throwf(query_error_s, lit("format_field: bad index: ~s"),
arg, nao);