fix failure of mbsinit(0) (not UB; required to return nonzero)

issue reported by Richard Pennington; slightly simpler fix applied
This commit is contained in:
Rich Felker 2012-05-26 18:02:45 -04:00
parent aefd0f69bd
commit 6436b371af
1 changed files with 1 additions and 1 deletions

View File

@ -13,5 +13,5 @@
int mbsinit(const mbstate_t *st)
{
return !*(unsigned *)st;
return !st || !*(unsigned *)st;
}