summaryrefslogtreecommitdiffstats
path: root/lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib.c')
-rw-r--r--lib.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib.c b/lib.c
index fa03e7c0..91768c3a 100644
--- a/lib.c
+++ b/lib.c
@@ -9817,7 +9817,10 @@ val cptr_int(val n, val type_sym_in)
{
val self = lit("cptr-int");
val type_sym = default_null_arg(type_sym_in);
- return cptr_typed(coerce(mem_t *, c_num(n, self)), type_sym, 0);
+ return cptr_typed(if3(plusp(n),
+ coerce(mem_t *, c_unum(n, self)),
+ coerce(mem_t *, c_num(n, self))),
+ type_sym, 0);
}
val cptr_obj(val obj, val type_sym_in)