From fce3b1f46ae5268df614df942591a8f328384d5d Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Sat, 9 Sep 2023 20:57:23 +0200 Subject: [PATCH] CCrashHandler: small code cleanup --- r5dev/tier0/crashhandler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/r5dev/tier0/crashhandler.cpp b/r5dev/tier0/crashhandler.cpp index e66b92d9..0999d054 100644 --- a/r5dev/tier0/crashhandler.cpp +++ b/r5dev/tier0/crashhandler.cpp @@ -128,7 +128,7 @@ void CCrashHandler::FormatModules() HANDLE hProcess = GetCurrentProcess(); DWORD cbNeeded; - BOOL result = K32EnumProcessModulesEx(hProcess, &*hModule.get(), CRASHHANDLER_MAX_MODULES, &cbNeeded, LIST_MODULES_ALL); + BOOL result = K32EnumProcessModulesEx(hProcess, hModule.get(), CRASHHANDLER_MAX_MODULES, &cbNeeded, LIST_MODULES_ALL); if (result && cbNeeded <= CRASHHANDLER_MAX_MODULES && cbNeeded >> 3) { CHAR szModuleName[MAX_FILEPATH]; @@ -137,7 +137,7 @@ void CCrashHandler::FormatModules() for (DWORD i = 0, j = cbNeeded >> 3; j; i++, j--) { - DWORD m = GetModuleFileNameA(hModule.get()[i], szModuleName, sizeof(szModuleName)); + DWORD m = GetModuleFileNameA(hModule[i], szModuleName, sizeof(szModuleName)); if ((m - 1) > (sizeof(szModuleName) - 2)) // Too small for buffer. { snprintf(szModuleName, sizeof(szModuleName), "module@%p", hModule.get()[i]);