iswspace: fix handling of 0
authorrofl0r <retnyg@gmx.net>
Mon, 11 Nov 2013 04:44:47 +0000 (05:44 +0100)
committerrofl0r <retnyg@gmx.net>
Mon, 11 Nov 2013 04:44:47 +0000 (05:44 +0100)
src/ctype/iswspace.c

index 99d517e6fa9a01b84039610e3f501df1909b7539..b0c0ae18cf225820891b050082b12266d135374f 100644 (file)
@@ -14,6 +14,5 @@ int iswspace(wint_t wc)
                0x2006, 0x2008, 0x2009, 0x200a,
                0x2028, 0x2029, 0x205f, 0x3000, 0
        };
-       if (wcschr(spaces, wc)) return 1;
-       return 0;
+       return wc && wcschr(spaces, wc);
 }