Commit 58140f73 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msvcrt: Fix long limits in _atol_l.

parent cd6516eb
......@@ -1094,11 +1094,11 @@ MSVCRT_long CDECL MSVCRT__atol_l(const char *str, MSVCRT__locale_t locale)
{
__int64 ret = MSVCRT_strtoi64_l(str, NULL, 10, locale);
if(ret > LONG_MAX) {
ret = LONG_MAX;
if(ret > MSVCRT_LONG_MAX) {
ret = MSVCRT_LONG_MAX;
*MSVCRT__errno() = MSVCRT_ERANGE;
} else if(ret < LONG_MIN) {
ret = LONG_MIN;
} else if(ret < MSVCRT_LONG_MIN) {
ret = MSVCRT_LONG_MIN;
*MSVCRT__errno() = MSVCRT_ERANGE;
}
return ret;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment