mirror of
https://github.com/decompals/wibo.git
synced 2025-12-12 14:46:09 +00:00
Fix a few compiler regressions
This commit is contained in:
@@ -536,6 +536,7 @@ LPVOID WINAPI VirtualAlloc(LPVOID lpAddress, SIZE_T dwSize, DWORD flAllocationTy
|
||||
setLastError(err);
|
||||
return nullptr;
|
||||
}
|
||||
DEBUG_LOG("-> success (base=%p, size=%zu)\n", base, size);
|
||||
return base;
|
||||
}
|
||||
|
||||
|
||||
@@ -3,11 +3,12 @@
|
||||
#include "context.h"
|
||||
#include "errors.h"
|
||||
#include "internal.h"
|
||||
#include "kernel32.h"
|
||||
#include "kernel32_trampolines.h"
|
||||
#include "strutil.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstring>
|
||||
#include <cwctype>
|
||||
#include <initializer_list>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
@@ -236,7 +237,7 @@ BOOL WINAPI EnumSystemLocalesA(LOCALE_ENUMPROCA lpLocaleEnumProc, DWORD dwFlags)
|
||||
}
|
||||
// Return to guest context before callback
|
||||
char localeId[] = "00000409"; // en-US
|
||||
return lpLocaleEnumProc(localeId);
|
||||
return call_LOCALE_ENUMPROCA(lpLocaleEnumProc, localeId);
|
||||
}
|
||||
|
||||
LCID WINAPI GetUserDefaultLCID() {
|
||||
|
||||
@@ -435,7 +435,7 @@ void initializeImpl() {
|
||||
|
||||
// Map and register guest arena (below 2GB, exclusive)
|
||||
ArenaRange guest;
|
||||
if (mapArena(kGuestArenaSize, kLowMemoryStart, kTopDownStart, false, "wibo guest arena", guest)) {
|
||||
if (mapArena(kGuestArenaSize, kLowMemoryStart, kTopDownStart, true, "wibo guest arena", guest)) {
|
||||
bool ok = mi_manage_os_memory_ex(guest.start, guest.size,
|
||||
/*is_committed*/ false,
|
||||
/*is_pinned*/ false,
|
||||
|
||||
@@ -7,8 +7,6 @@
|
||||
#include "files.h"
|
||||
#include "heap.h"
|
||||
#include "kernel32/internal.h"
|
||||
#include "msvcrt.h"
|
||||
#include "msvcrt_trampolines.h"
|
||||
#include "strutil.h"
|
||||
#include "tls.h"
|
||||
|
||||
@@ -1278,6 +1276,7 @@ void *resolveFuncByName(ModuleInfo *info, const char *funcName) {
|
||||
if (it != info->exportNameToOrdinal.end()) {
|
||||
return resolveFuncByOrdinal(info, it->second);
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
return reinterpret_cast<void *>(resolveMissingFuncName(info->originalName.c_str(), funcName));
|
||||
}
|
||||
@@ -1303,6 +1302,7 @@ void *resolveFuncByOrdinal(ModuleInfo *info, uint16_t ordinal) {
|
||||
}
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
return reinterpret_cast<void *>(resolveMissingFuncOrdinal(info->originalName.c_str(), ordinal));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user