X-Git-Url: https://pd.if.org/git/?p=pdclib;a=blobdiff_plain;f=functions%2Fstring%2Fstrerror.c;fp=functions%2Fstring%2Fstrerror.c;h=47e064be43324deb746ae2110ee8cb0002479911;hp=0ed494d03d030f6660254459e9639ac292b7dab7;hb=9feedd59d824b75950b8d15be6a2a34534c2a6d9;hpb=62ee8c813a22690a258c23c4c0befab9174ea9b1 diff --git a/functions/string/strerror.c b/functions/string/strerror.c index 0ed494d..47e064b 100644 --- a/functions/string/strerror.c +++ b/functions/string/strerror.c @@ -13,13 +13,13 @@ /* TODO: Doing this via a static array is not the way to do it. */ char * strerror( int errnum ) { - if ( errnum == 0 || errnum >= _PDCLIB_ERRNO_MAX ) + if ( errnum >= _PDCLIB_ERRNO_MAX ) { return (char *)"Unknown error"; } else { - return _PDCLIB_threadlocale()->_ErrnoStr[errnum]; + return (char *)_PDCLIB_threadlocale()->_ErrnoStr[errnum]; } }