mirror of git://git.musl-libc.org/musl
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:
parent
aefd0f69bd
commit
6436b371af
|
@ -13,5 +13,5 @@
|
|||
|
||||
int mbsinit(const mbstate_t *st)
|
||||
{
|
||||
return !*(unsigned *)st;
|
||||
return !st || !*(unsigned *)st;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue