[bugfix] pic_load_point should restore pic->cc

This commit is contained in:
Yuichi Nishiwaki 2015-07-06 14:18:49 +09:00
parent f210efd066
commit 5e6f6f85f4
2 changed files with 1 additions and 3 deletions

View File

@ -79,6 +79,7 @@ pic_load_point(pic_state *pic, struct pic_cont *cont)
pic->arena_idx = cont->arena_idx; pic->arena_idx = cont->arena_idx;
pic->ip = cont->ip; pic->ip = cont->ip;
pic->ptable = cont->ptable; pic->ptable = cont->ptable;
pic->cc = cont->prev;
} }
static pic_value static pic_value
@ -140,8 +141,6 @@ pic_callcc(pic_state *pic, struct pic_proc *proc)
pic_save_point(pic, &cont); pic_save_point(pic, &cont);
if (PIC_SETJMP(pic, cont.jmp)) { if (PIC_SETJMP(pic, cont.jmp)) {
pic->cc = pic->cc->prev;
return pic_values_by_list(pic, cont.results); return pic_values_by_list(pic, cont.results);
} }
else { else {

View File

@ -44,7 +44,6 @@ struct pic_error *pic_make_error(pic_state *, pic_sym *, const char *, pic_list)
} while (0); \ } while (0); \
pic->cc = pic->cc->prev; \ pic->cc = pic->cc->prev; \
} else { \ } else { \
pic->cc = pic->cc->prev; \
goto label; \ goto label; \
} \ } \
} while (0); \ } while (0); \