diff options
author | Rich Felker <dalias@aerifal.cx> | 2012-05-26 18:02:45 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2012-05-26 18:02:45 -0400 |
commit | 6436b371af2b52a7b60a5b4f304d1aca2f9f60b3 (patch) | |
tree | e336580ea7f51a57ddcde46121d2b49c31fbc754 /src | |
parent | aefd0f69bd22b825a6196e65b40a02e79fec23b5 (diff) | |
download | musl-6436b371af2b52a7b60a5b4f304d1aca2f9f60b3.tar.gz musl-6436b371af2b52a7b60a5b4f304d1aca2f9f60b3.tar.xz musl-6436b371af2b52a7b60a5b4f304d1aca2f9f60b3.zip |
fix failure of mbsinit(0) (not UB; required to return nonzero)
issue reported by Richard Pennington; slightly simpler fix applied
Diffstat (limited to 'src')
-rw-r--r-- | src/multibyte/mbsinit.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/multibyte/mbsinit.c b/src/multibyte/mbsinit.c index d307e5a7..c0e7e494 100644 --- a/src/multibyte/mbsinit.c +++ b/src/multibyte/mbsinit.c @@ -13,5 +13,5 @@ int mbsinit(const mbstate_t *st) { - return !*(unsigned *)st; + return !st || !*(unsigned *)st; } |