reg: Fix dword conversion on 64-bit operating systems.

Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Hugh McMaster 2016-08-18 09:59:53 +00:00 committed by Alexandre Julliard
parent 60f8b516e2
commit 8a8a753cfa
1 changed files with 2 additions and 2 deletions

View File

@ -249,9 +249,9 @@ static LPBYTE get_regdata(const WCHAR *data, DWORD reg_type, WCHAR separator, DW
case REG_DWORD_BIG_ENDIAN: /* Yes, this is correct! */ case REG_DWORD_BIG_ENDIAN: /* Yes, this is correct! */
{ {
LPWSTR rest; LPWSTR rest;
DWORD val; unsigned long val;
val = strtoulW(data, &rest, (tolowerW(data[1]) == 'x') ? 16 : 10); val = strtoulW(data, &rest, (tolowerW(data[1]) == 'x') ? 16 : 10);
if (*rest || data[0] == '-' || (val == ~0u && errno == ERANGE)) { if (*rest || data[0] == '-' || (val == ~0u && errno == ERANGE) || val > ~0u) {
output_message(STRING_MISSING_INTEGER); output_message(STRING_MISSING_INTEGER);
break; break;
} }