Re: testgtk crashes in bsearch



on 9/10/01 3:04 AM, Padraig O'Briain at Padraig Obriain Sun COM wrote:

> +  if (style->property_cache->len > 0)
> +  {
> +    /* On Solaris bsearch does not check that the length is non-zero */
> +    pcache = bsearch (&key,
> +                     style->property_cache->data, style->property_cache->len,
> +                     sizeof (PropertyValue), style_property_values_cmp);
> +    if (pcache)
> +      return &pcache->value;
> +  }

Perhaps a g_bsearch that does the check for zero before calling through on
Solaris is the best workaround for this in the long run?

    -- Darin





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]