about summary refs log tree commit diff stats
path: root/076continuation.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2018-02-20 22:09:12 -0800
committerKartik K. Agaram <vc@akkartik.com>2018-02-20 22:09:12 -0800
commitc1bb5eca952243e4ec4b8b0db218407a5a0260b3 (patch)
tree44b13a2e7c54307e0adebd419e88b83466fdf390 /076continuation.cc
parentc1a46edfce4d3f6719fd94462f2498105ac6fa87 (diff)
downloadmu-c1bb5eca952243e4ec4b8b0db218407a5a0260b3.tar.gz
4213
Diffstat (limited to '076continuation.cc')
-rw-r--r--076continuation.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/076continuation.cc b/076continuation.cc
index 38e0185b..54037b41 100644
--- a/076continuation.cc
+++ b/076continuation.cc
@@ -118,6 +118,9 @@ CALL_WITH_CONTINUATION_MARK,
 Recipe_ordinal["call-with-continuation-mark"] = CALL_WITH_CONTINUATION_MARK;
 :(before "End Primitive Recipe Checks")
 case CALL_WITH_CONTINUATION_MARK: {
+  if (SIZE(inst.ingredients) < 2) {
+    raise << maybe(get(Recipe, r).name) << "'" << to_original_string(inst) << "' requires at least two ingredients: a mark number and a recipe to call\n" << end();
+  }
   break;
 }
 :(before "End Primitive Recipe Implementations")