[PATCH 01/13] reg: Compile with msvcrt

Hugh McMaster hugh.mcmaster at outlook.com
Fri Aug 18 04:29:35 CDT 2017


Signed-off-by: Hugh McMaster <hugh.mcmaster at outlook.com>
---
 programs/reg/Makefile.in | 2 +-
 programs/reg/reg.c       | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/programs/reg/Makefile.in b/programs/reg/Makefile.in
index c255171323..7a70a33a69 100644
--- a/programs/reg/Makefile.in
+++ b/programs/reg/Makefile.in
@@ -1,5 +1,5 @@
 MODULE    = reg.exe
-APPMODE   = -mconsole -municode
+APPMODE   = -mconsole -municode -mno-cygwin
 IMPORTS   = advapi32
 DELAYIMPORTS = user32
 
diff --git a/programs/reg/reg.c b/programs/reg/reg.c
index 72f2b5852f..cb3bd4ed41 100644
--- a/programs/reg/reg.c
+++ b/programs/reg/reg.c
@@ -284,8 +284,8 @@ static LPBYTE get_regdata(const WCHAR *data, DWORD reg_type, WCHAR separator, DW
         {
             LPWSTR rest;
             unsigned long val;
-            val = strtoulW(data, &rest, (tolowerW(data[1]) == 'x') ? 16 : 10);
-            if (*rest || data[0] == '-' || (val == ~0u && errno == ERANGE) || val > ~0u) {
+            val = wcstoul(data, &rest, (tolowerW(data[1]) == 'x') ? 16 : 10);
+            if (*rest || data[0] == '-' || (val == ~0u && errno == ERANGE)) {
                 output_message(STRING_MISSING_INTEGER);
                 break;
             }
-- 
2.14.1




More information about the wine-patches mailing list