From 88fa7cfc6b225d00ab2225f8f587b1e145dfbdf3 Mon Sep 17 00:00:00 2001 From: "SiyangXie@gmail.com" Date: Fri, 11 Mar 2011 22:47:07 +0000 Subject: Protect "std::max", "std::min" against MACROs defined in WinDef.h. git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@780 4c0a9323-5329-0410-9bdc-e9ce6186880e --- src/client/windows/handler/exception_handler.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/client/windows') diff --git a/src/client/windows/handler/exception_handler.cc b/src/client/windows/handler/exception_handler.cc index 9c0593b4..ec5397dc 100644 --- a/src/client/windows/handler/exception_handler.cc +++ b/src/client/windows/handler/exception_handler.cc @@ -793,11 +793,11 @@ bool ExceptionHandler::WriteMinidumpWithException( // pointer, but settle for whatever's available up to the // boundaries of the memory region. const ULONG64 kIPMemorySize = 256; - context.memory_base = - std::max(reinterpret_cast(info.BaseAddress), + context.memory_base = + (std::max)(reinterpret_cast(info.BaseAddress), instruction_pointer - (kIPMemorySize / 2)); ULONG64 end_of_range = - std::min(instruction_pointer + (kIPMemorySize / 2), + (std::min)(instruction_pointer + (kIPMemorySize / 2), reinterpret_cast(info.BaseAddress) + info.RegionSize); context.memory_size = -- cgit v1.2.1