Piotr Caban : msvcrt: Fix long limits in _atol_l.

Alexandre Julliard julliard at winehq.org
Mon Mar 18 16:20:13 CDT 2019


Module: wine
Branch: master
Commit: 58140f73a27646ee57e9b6fbd395f0a0ec03b74e
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=58140f73a27646ee57e9b6fbd395f0a0ec03b74e

Author: Piotr Caban <piotr at codeweavers.com>
Date:   Sat Mar 16 14:48:08 2019 +0100

msvcrt: Fix long limits in _atol_l.

Signed-off-by: Piotr Caban <piotr at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/msvcrt/string.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/dlls/msvcrt/string.c b/dlls/msvcrt/string.c
index fc827d8..f31ba60 100644
--- a/dlls/msvcrt/string.c
+++ b/dlls/msvcrt/string.c
@@ -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;




More information about the wine-cvs mailing list