diff options
author | jbzdarkid <jbzdarkid@gmail.com> | 2019-11-14 09:08:35 -0800 |
---|---|---|
committer | jbzdarkid <jbzdarkid@gmail.com> | 2019-11-14 09:08:35 -0800 |
commit | 1b833a86102981ce178119fc3526f354b7622170 (patch) | |
tree | 375d72ffc7ff250d13f796362919ac800be2af54 /Source/Memory.cpp | |
parent | 98db209c9008492baec6bb482b047d386fbdd42b (diff) | |
download | witness-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.cpp | 3 |
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 | ||
153 | void Memory::ThrowError() { | 153 | void 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); |