*polished code.

This commit is contained in:
Wang Renxin 2016-06-21 10:47:21 +08:00 committed by GitHub
parent 426e26bbcd
commit 134804e4f5

View File

@ -12240,10 +12240,8 @@ int mb_debug_get_stack_trace(struct mb_interpreter_t* s, void** l, char** fs, un
mb_assert(s);
if(fs && fc) {
if(_ls_count(s->stack_frames) > fc) {
fs[fc - 1] = "...";
fc--;
}
if(_ls_count(s->stack_frames) > fc)
fs[--fc] = "...";
f = s->stack_frames->prev;
while(f != s->stack_frames && f && f->data && i < fc) {
fs[i++] = (char*)f->data;