Branch: Tag:

2008-01-24

2008-01-24 17:48:18 by Martin Stjernholm <mast@lysator.liu.se>

Fixed a couple of places where integer svalues without a defined subtype
were put on the stack. (These svalues can cause zero_type() calls to behave
randomly.)

Rev: src/operators.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: operators.c,v 1.191 2004/09/20 15:05:08 grubba Exp $ + || $Id: operators.c,v 1.192 2008/01/24 17:48:18 mast Exp $   */      #include "global.h"   #include <math.h> - RCSID("$Id: operators.c,v 1.191 2004/09/20 15:05:08 grubba Exp $"); + RCSID("$Id: operators.c,v 1.192 2008/01/24 17:48:18 mast Exp $");   #include "interpret.h"   #include "svalue.h"   #include "multiset.h"
286:   #endif /* AUTO_BIGNUM */    {    sp[-1].type=T_INT; +  sp[-1].subtype = NUMBER_NUMBER;    sp[-1].u.integer=i;    }    }
306: Inside #if defined(AUTO_BIGNUM)
   int i=atoi(sp[-1].u.string->str);    free_string(sp[-1].u.string);    sp[-1].type=T_INT; +  sp[-1].subtype = NUMBER_NUMBER;    sp[-1].u.integer=i;    }    else
320:    int i=STRTOL(sp[-1].u.string->str,0,10);    free_string(sp[-1].u.string);    sp[-1].type=T_INT; +  sp[-1].subtype = NUMBER_NUMBER;    sp[-1].u.integer=i;    }   #endif /* AUTO_BIGNUM */
3913:    default:    free_svalue(sp-1);    sp[-1].type=T_INT; +  sp[-1].subtype = NUMBER_NUMBER;    sp[-1].u.integer=0;    }   }