diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-12-07 23:23:12 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-12-07 23:23:12 -0800 |
commit | c8fbf7b8c903a70cb959f53208ef76d0932d019b (patch) | |
tree | 94b918919150a6a4f8e8b24304bf4032aee8d89c | |
parent | 777aae2e41c3aa6989c2a37341dadf0fcc701489 (diff) | |
download | mu-c8fbf7b8c903a70cb959f53208ef76d0932d019b.tar.gz |
2620
-rw-r--r-- | 036call_reply.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/036call_reply.cc b/036call_reply.cc index fef2351d..7096727a 100644 --- a/036call_reply.cc +++ b/036call_reply.cc @@ -28,7 +28,10 @@ case REPLY: { if (Trace_stream) { trace(9999, "trace") << "reply: decrementing callstack depth from " << Trace_stream->callstack_depth << end(); --Trace_stream->callstack_depth; - assert(Trace_stream->callstack_depth >= 0); + if (Trace_stream->callstack_depth < 0) { + Current_routine->state = COMPLETED; + goto stop_running_current_routine; + } } Current_routine->calls.pop_front(); // just in case 'main' returns a value, drop it for now |