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")
href='#n138'>138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214