about summary refs log tree commit diff stats
path: root/Source/Memory.cpp
diff options
context:
space:
mode:
authorjbzdarkid <jbzdarkid@gmail.com>2019-11-14 09:08:35 -0800
committerjbzdarkid <jbzdarkid@gmail.com>2019-11-14 09:08:35 -0800
commit1b833a86102981ce178119fc3526f354b7622170 (patch)
tree375d72ffc7ff250d13f796362919ac800be2af54 /Source/Memory.cpp
parent98db209c9008492baec6bb482b047d386fbdd42b (diff)
downloadwitness-tutorializer-1b833a86102981ce178119fc3526f354b7622170.tar.gz
witness-tutorializer-1b833a86102981ce178119fc3526f354b7622170.tar.bz2
witness-tutorializer-1b833a86102981ce178119fc3526f354b7622170.zip
small changes
Diffstat (limited to 'Source/Memory.cpp')
-rw-r--r--Source/Memory.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/Memory.cpp b/Source/Memory.cpp index c3b89d0..98b06f9 100644 --- a/Source/Memory.cpp +++ b/Source/Memory.cpp
@@ -152,7 +152,8 @@ int Memory::ExecuteSigScans()
152 152
153void Memory::ThrowError() { 153void Memory::ThrowError() {
154 std::wstring message(256, '\0'); 154 std::wstring message(256, '\0');
155 int length = FormatMessageW(FORMAT_MESSAGE_FROM_SYSTEM, nullptr, GetLastError(), 1024, &message[0], static_cast<DWORD>(message.size()), nullptr); 155 DWORD error = GetLastError();
156 int length = FormatMessageW(FORMAT_MESSAGE_FROM_SYSTEM, nullptr, error, 1024, &message[0], static_cast<DWORD>(message.size()), nullptr);
156 message.resize(length); 157 message.resize(length);
157#ifndef NDEBUG 158#ifndef NDEBUG
158 MessageBox(NULL, message.c_str(), L"Please tell darkid about this", MB_OK); 159 MessageBox(NULL, message.c_str(), L"Please tell darkid about this", MB_OK);