Branch: Tag:

2002-08-06

2002-08-06 13:50:54 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Fix for [bug 3096 (#3096)].

Rev: src/encode.c:1.150

26:   #include "bignum.h"   #include "pikecode.h"    - RCSID("$Id: encode.c,v 1.149 2002/06/25 14:26:40 grubba Exp $"); + RCSID("$Id: encode.c,v 1.150 2002/08/06 13:50:54 grubba Exp $");      /* #define ENCODE_DEBUG */   
2404:       p = program_from_svalue(Pike_sp-1);    -  if(data->pickyness && !p) { +  if (!p) { +  if(data->pickyness) {    if ((prog_code->type == T_STRING) &&    (prog_code->u.string->len < 128) &&    (!prog_code->u.string->size_shift)) {
2413:    }    Pike_error("Failed to decode program.\n");    } +  pop_n_elems(2); +  push_undefined(); +  break; +  }    /* Remove the extra entry from the stack. */ -  stack_swap(); -  pop_stack(); +     ref_push_program(p); -  stack_swap(); -  pop_stack(); +  stack_pop_n_elems_keep_top(2);    break;    }