Branch: Tag:

2008-02-29

2008-02-29 14:28:29 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Fixed bug with decoding of bignums on 64-bit architectures.

Rev: src/encode.c:1.192

2:   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: encode.c,v 1.191 2008/02/27 10:23:18 grubba Exp $ + || $Id: encode.c,v 1.192 2008/02/29 14:28:29 grubba Exp $   */      #include "global.h"
32:   #include "opcodes.h"   #include "peep.h"    - RCSID("$Id: encode.c,v 1.191 2008/02/27 10:23:18 grubba Exp $"); + RCSID("$Id: encode.c,v 1.192 2008/02/29 14:28:29 grubba Exp $");      /* #define ENCODE_DEBUG */   
2690:    break;    }    -  if(Pike_sp[-1].type != T_OBJECT && data->pickyness) +  if((Pike_sp[-1].type != T_OBJECT) && data->pickyness) { +  if (num != 2) {    decode_error(NULL, Pike_sp - 1, "Failed to decode object. Got: "); -  +  } else if (Pike_sp[-1].type != PIKE_T_INT) { +  decode_error(NULL, Pike_sp - 1, "Failed to decode bignum. Got: "); +  } +  }       break;    }