fixed coredump on corrupt charset index

This commit is contained in:
sasha@mysql.sashanet.com 2000-08-30 17:50:26 -06:00
parent 7a5ec23025
commit 337dee0e77

View File

@ -63,9 +63,10 @@ static uint num_from_csname(CS_ID **cs, const char *name)
static char *name_from_csnum(CS_ID **cs, uint number)
{
CS_ID **c;
for (c = cs; *c; ++c)
if ((*c)->number == number)
return (*c)->name;
if(cs)
for (c = cs; *c; ++c)
if ((*c)->number == number)
return (*c)->name;
return "?"; /* this mimics find_type() */
}