Skip to content

Commit

Permalink
custom opcodes handler fix
Browse files Browse the repository at this point in the history
  • Loading branch information
MiranDMC authored and x87 committed Nov 2, 2023
1 parent 7c6e21b commit c4fa849
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/CCustomOpcodeSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#include "CTextManager.h"
#include "CModelInfo.h"

#include <filesystem>
#include <sstream>

#define OPCODE_VALIDATE_STR_ARG_READ(x) if((void*)x == nullptr) { SHOW_ERROR("%s in script %s \nScript suspended.", lastErrorMsg.c_str(), ((CCustomScript*)thread)->GetInfoStr().c_str()); return CCustomOpcodeSystem::ErrorSuspendScript(thread); }
Expand Down Expand Up @@ -397,6 +396,7 @@ namespace CLEO
customOpcodeHandlers[i] = (_OpcodeHandler)customOpcodeHandler;
}
MemWrite(gvm.TranslateMemoryAddress(MA_OPCODE_HANDLER_REF), &customOpcodeHandlers);
MemWrite(0x00469EF0, &customOpcodeHandlers); // TODO: game version translation

FUNC_fopen = gvm.TranslateMemoryAddress(MA_FOPEN_FUNCTION);
FUNC_fclose = gvm.TranslateMemoryAddress(MA_FCLOSE_FUNCTION);
Expand Down

0 comments on commit c4fa849

Please sign in to comment.