pike.git / src / stralloc.c

version» Context lines:

pike.git/src/stralloc.c:1:   /*   || 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: stralloc.c,v 1.224 2008/06/29 17:56:06 nilsson Exp $ + || $Id: stralloc.c,v 1.225 2008/06/29 21:08:14 grubba Exp $   */      #include "global.h"   #include "stralloc.h"   #include "pike_macros.h"   #include "dynamic_buffer.h"   #include "pike_macros.h"   #include "pike_memory.h"   #include "pike_error.h"   #include "gc.h"
pike.git/src/stralloc.c:1189: Inside #if defined(PIKE_DEBUG)
   p_wchar1 *str = STR1 (s);    for (i = 0; i < s->len; i++)    if (str[i] > 0xff)    goto size_shift_check_done;    Pike_fatal ("Shared string is too wide.\n");    }    case 2: {    ptrdiff_t i;    p_wchar2 *str = STR2 (s);    for (i = 0; i < s->len; i++) -  if (str[i] > 0xffff) +  if ((str[i] > 0xffff) || (str[i] < 0))    goto size_shift_check_done;    Pike_fatal ("Shared string is too wide.\n");    }    default:    Pike_fatal ("Invalid size shift %d.\n", s->size_shift);    }    size_shift_check_done:;       if(do_hash(s) != s->hval)    {