From 50390f48e7474965c275d40aa492ec484516a0d8 Mon Sep 17 00:00:00 2001 From: Peace-Maker Date: Sun, 20 May 2018 10:48:56 +0200 Subject: [PATCH] Fix defining virtual hooks in gamedata "Functions" section #1 The "offset" key wasn't included in the validation of having the target function set. --- signatures.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/signatures.cpp b/signatures.cpp index a6eea4a..f82c0f5 100644 --- a/signatures.cpp +++ b/signatures.cpp @@ -340,7 +340,7 @@ SMCResult SignatureGameConfig::ReadSMC_LeavingSection(const SMCStates *states) case PState_Function: g_ParseState = PState_Root; - if (!g_CurrentSignature->address.length() && !g_CurrentSignature->signature.length()) + if (!g_CurrentSignature->address.length() && !g_CurrentSignature->signature.length() && !g_CurrentSignature->offset.length()) { smutils->LogError(myself, "Function \"%s\" doesn't have a \"signature\", \"offset\" nor \"address\" set: line: %i col: %i", g_CurrentFunctionName.chars(), states->line, states->col); return SMCResult_HaltFail;