Environment::printKill: Use sizeu1 for system-independent pointer prints

This commit is contained in:
toaster 2024-05-21 00:37:00 +01:00
parent 1db8e810df
commit 5ccdd4fd12

View file

@ -436,13 +436,13 @@ void Environment::printKill(ACSVM::Thread *thread, ACSVM::Word type, ACSVM::Word
} }
else if (killType == ACSVM::KillType::OutOfBounds) else if (killType == ACSVM::KillType::OutOfBounds)
{ {
CONS_Alert(CONS_ERROR, "ACSVM ERROR: Jumped to out of bounds location %lu in script %s\n", CONS_Alert(CONS_ERROR, "ACSVM ERROR: Jumped to out of bounds location %s in script %s\n",
(thread->codePtr - thread->module->codeV.data() - 1), scriptName.c_str()); sizeu1(thread->codePtr - thread->module->codeV.data() - 1), scriptName.c_str());
} }
else else
{ {
CONS_Alert(CONS_ERROR, "ACSVM ERROR: Kill %u:%d at %lu in script %s\n", CONS_Alert(CONS_ERROR, "ACSVM ERROR: Kill %u:%d at %s in script %s\n",
type, data, (thread->codePtr - thread->module->codeV.data() - 1), scriptName.c_str()); type, data, sizeu1(thread->codePtr - thread->module->codeV.data() - 1), scriptName.c_str());
} }
CONS_Printf("Script terminated.\n"); CONS_Printf("Script terminated.\n");