diff options
Diffstat (limited to 'src/instruction/decrement.c')
| -rw-r--r-- | src/instruction/decrement.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/instruction/decrement.c b/src/instruction/decrement.c index f7f54dd..ce3af87 100644 --- a/src/instruction/decrement.c +++ b/src/instruction/decrement.c @@ -1,8 +1,11 @@ #include "3cl.h" -#include "instruction.h" + +#include "utils.h" struct CCLFrame *ccl_instruction_decrement(struct CCL *ccl, struct CCLFrame *frame) { + if (ccl->stack.cur < 1) + die(1, "stack size is %d (%d required)", ccl->stack.cur, 1); --ccl->stack.stack[ccl->stack.cur]; return frame; } |