obj = (Index_Entry *) (base + (elemsize * id));
if (obj->id == id)
return obj;
+ if (obj->id < id)
+ low = id + 1;
+ else
+ high = id;
}
// Binary search
start_high = high;
- while(high != low)
+ while(high > low)
{
cur = low + ((high - low) / 2);
obj = (Index_Entry *) (base + (elemsize * cur));
fe->map->mempool.data + gl->offset;
gl->base.bitmap.num_grays = gd->num_grays;
gl->base.bitmap.pixel_mode = gd->pixel_mode;
+ gl->idx = gd->index;
gl->rid = 0;
eina_clist_add_head(&fe->map->glyphs, &gl->map_entry);
fash_gl_add(fe->fash[hints], gd->index, gl);
cnt++;
}
- DBG("Added %d glyphs to the font hash (out of %d scanned)", cnt, tot);
+ if (cnt)
+ DBG("Added %d glyphs to the font hash (out of %d scanned)", cnt, tot);
}
return cnt;