Skip to content

Commit

Permalink
Fix reading of Windows platform in 64 bits systems
Browse files Browse the repository at this point in the history
  • Loading branch information
chemamartinez committed Jun 22, 2018
1 parent 2454f1c commit 78b5a4c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/shared/file_op.c
Expand Up @@ -1371,7 +1371,7 @@ const char *getuname()
DWORD dwCount = size;
add_infoEx = 0;

if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, TEXT("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion"), 0, KEY_READ, &RegistryKey) != ERROR_SUCCESS) {
if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, TEXT("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion"), 0, KEY_READ | KEY_WOW64_64KEY , &RegistryKey) != ERROR_SUCCESS) {
merror("Error opening Windows registry.");
}

Expand Down Expand Up @@ -1590,7 +1590,7 @@ const char *getuname()
DWORD dwCount = size;
unsigned long type=REG_DWORD;

if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, TEXT("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion"), 0, KEY_READ, &RegistryKey) != ERROR_SUCCESS) {
if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, TEXT("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion"), 0, KEY_READ | KEY_WOW64_64KEY, &RegistryKey) != ERROR_SUCCESS) {
merror("Error opening Windows registry.");
}

Expand Down

0 comments on commit 78b5a4c

Please sign in to comment.