From befb8be391543f4fadcc4f49aa48d219368e25a9 Mon Sep 17 00:00:00 2001 From: Aki Date: Sat, 2 Oct 2021 16:19:10 +0200 Subject: Replaced min max macros with std ones --- Stars45/ExceptionHandler.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Stars45/ExceptionHandler.cpp') diff --git a/Stars45/ExceptionHandler.cpp b/Stars45/ExceptionHandler.cpp index 17519be..6233b7a 100644 --- a/Stars45/ExceptionHandler.cpp +++ b/Stars45/ExceptionHandler.cpp @@ -32,6 +32,9 @@ */ +#define NOMINMAX + +#include #include #include @@ -265,7 +268,7 @@ ExceptionHandler::GetLogicalAddress(void* addr, char* mod_name, int len, DWORD& for (unsigned i = 0; i < pNtHdr->FileHeader.NumberOfSections; i++, pSection++ ) { DWORD sectionStart = pSection->VirtualAddress; DWORD sectionEnd = sectionStart - + max(pSection->SizeOfRawData, pSection->Misc.VirtualSize); + + std::max(pSection->SizeOfRawData, pSection->Misc.VirtualSize); // Is the address in this section??? if ((rva >= sectionStart) && (rva <= sectionEnd)) { -- cgit v1.1