about summary refs log tree commit diff stats
path: root/Source/Memory.cpp
diff options
context:
space:
mode:
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);