diff options
author | Aki <please@ignore.pl> | 2021-10-02 16:19:10 +0200 |
---|---|---|
committer | Aki <please@ignore.pl> | 2021-10-02 16:19:10 +0200 |
commit | befb8be391543f4fadcc4f49aa48d219368e25a9 (patch) | |
tree | 59b98e9738c2430ba9057dd0edf6d2cc14b3e2cd /Stars45/ExceptionHandler.cpp | |
parent | 41b26fc450b60830ad3a9ed65941e51193d65e99 (diff) | |
download | starshatter-befb8be391543f4fadcc4f49aa48d219368e25a9.zip starshatter-befb8be391543f4fadcc4f49aa48d219368e25a9.tar.gz starshatter-befb8be391543f4fadcc4f49aa48d219368e25a9.tar.bz2 |
Replaced min max macros with std ones
Diffstat (limited to 'Stars45/ExceptionHandler.cpp')
-rw-r--r-- | Stars45/ExceptionHandler.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
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 <algorithm> #include <windows.h> #include <imagehlp.h> @@ -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)) { |