make sure we walk every clause when doing restore mega_clause.

This commit is contained in:
Vitor Santos Costa
2009-11-02 12:46:39 +00:00
parent 021141188f
commit a628079e00
6 changed files with 27 additions and 14 deletions

View File

@@ -4,10 +4,12 @@
static void
restore_opcodes(yamop *pc)
restore_opcodes(yamop *pc, yamop *max)
{
do {
op_numbers op = Yap_op_from_opcode(pc->opc);
op_numbers op;
if (max && pc >= max) return;
op = Yap_op_from_opcode(pc->opc);
pc->opc = Yap_opcode(op);
#ifdef DEBUG_RESTORE2
fprintf(stderr, "%s ", Yap_op_names[op]);