Some fixes

This commit is contained in:
momo5502
2025-06-04 20:45:48 +02:00
parent d18a60561c
commit 956e73d839
4 changed files with 7 additions and 3 deletions

View File

@@ -17,7 +17,7 @@ namespace
void handle_suspicious_activity(windows_emulator& win_emu, const std::string_view details)
{
const auto rip = win_emu.emu().read_instruction_pointer();
win_emu.log.print(color::pink, "Suspicious: %.*s (0x%" PRIX64 ")\n", STR_VIEW_VA(details), rip);
win_emu.log.print(color::pink, "Suspicious: %.*s (0x%" PRIx64 ")\n", STR_VIEW_VA(details), rip);
}
emulator_callbacks::continuation handle_syscall(windows_emulator& win_emu, const uint32_t syscall_id,

View File

@@ -66,4 +66,8 @@ using USHORT = WORD;
#define FALSE 0
#endif
static_assert(sizeof(DWORD) == 4);
static_assert(sizeof(ULONG) == 4);
static_assert(sizeof(int) == 4);
// NOLINTEND(modernize-use-using)

View File

@@ -1,7 +1,7 @@
#pragma once
#include <utils/object.hpp>
#if defined(__clang__) || defined(__GNUC__)
#if (defined(__clang__) || defined(__GNUC__)) && !defined(__MINGW64__)
#define FORMAT_ATTRIBUTE(fmt_pos, var_pos) __attribute__((format(printf, fmt_pos, var_pos)))
#else
#define FORMAT_ATTRIBUTE(fmt_pos, var_pos)

View File

@@ -425,7 +425,7 @@ namespace syscalls
if (flags != 0)
{
c.win_emu.log.error("NtGetNextThread flags %X not supported\n", flags);
c.win_emu.log.error("NtGetNextThread flags %X not supported\n", static_cast<uint32_t>(flags));
c.emu.stop();
return STATUS_NOT_SUPPORTED;
}