(ef_init_chr): Add a NULL check to sentinel check.

This commit is contained in:
Ron Koenderink 2005-10-29 20:38:59 +00:00
parent 6c849f0334
commit bb79c64b92

View file

@ -521,7 +521,9 @@ ef_init_chr(int type, size_t size, ptrdiff_t name_offs)
struct empfile *ep = &empfile[type]; struct empfile *ep = &empfile[type];
char *p; char *p;
for (p = ep->cache; **((char **)(p + name_offs)); p += size) ; for (p = ep->cache;
*((char **)(p + name_offs)) && **((char **)(p + name_offs));
p += size) ;
ef_fix_size(ep, (p - ep->cache) / size); ef_fix_size(ep, (p - ep->cache) / size);
} }