(ef_init_chr): Add a NULL check to sentinel check.
This commit is contained in:
parent
6c849f0334
commit
bb79c64b92
1 changed files with 3 additions and 1 deletions
|
@ -521,7 +521,9 @@ ef_init_chr(int type, size_t size, ptrdiff_t name_offs)
|
|||
struct empfile *ep = &empfile[type];
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue