X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=functions%2Fstring%2Fstrerror.c;h=47e064be43324deb746ae2110ee8cb0002479911;hb=9feedd59d824b75950b8d15be6a2a34534c2a6d9;hp=0ed494d03d030f6660254459e9639ac292b7dab7;hpb=e1c526e9bad3f6e69391e94059096145390508d3;p=pdclib 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]; } }