Skip to content

Commit

Permalink
Update main.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
RusJJ authored Apr 3, 2024
1 parent 112d876 commit f5c8e6f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ extern "C" void OnGameCrash(const char* szLibName, int sig, int code, uintptr_t
if(!lastScriptHandle || !lastScriptPC) return;

char buf[512];
snprintf(buf, sizeof(buf), "Latest script handle: 0x%08X, PC: 0x%08X", lastScriptHandle, lastScriptPC);
snprintf(buf, sizeof(buf), "Latest script handle: 0x%08X, PC: 0x%08X", (uint32_t)lastScriptHandle, (uint32_t)lastScriptPC);
cleo->PrintToCleoLog(buf);

// Check if this script handle is still correct
Expand All @@ -580,7 +580,7 @@ extern "C" void OnGameCrash(const char* szLibName, int sig, int code, uintptr_t
cleo->PrintToCleoLog(buf);

bool isCustom = GetAddonInfo(lastScriptHandle).isCustom;
const char* scrName = isCustom ? "" : ((GTAScript*)lastScriptHandle).name;
const char* scrName = isCustom ? CLEO_GetScriptFilename(handle) : ((GTAScript*)lastScriptHandle)->name;
snprintf(buf, sizeof(buf), "Script name: %s", scrName ? scrName : "(null)");
cleo->PrintToCleoLog(buf);

Expand Down

0 comments on commit f5c8e6f

Please sign in to comment.