diff --git a/libs/wine/string.c b/libs/wine/string.c index f2a9bd3c704..7aa981f0a62 100644 --- a/libs/wine/string.c +++ b/libs/wine/string.c @@ -19,6 +19,7 @@ */ #include +#include #include #include @@ -162,6 +163,7 @@ long int strtolW( const WCHAR *nptr, WCHAR **endptr, int base ) if (overflow) { + errno = ERANGE; return negative ? LONG_MIN : LONG_MAX; } @@ -274,6 +276,7 @@ unsigned long int strtoulW( const WCHAR *nptr, WCHAR **endptr, int base ) if (overflow) { + errno = ERANGE; return ULONG_MAX; }