From 66df3318479e631a0c46b4267445720d9dd3d9cc Mon Sep 17 00:00:00 2001 From: CreepNT Date: Sun, 25 Aug 2024 13:23:56 +0200 Subject: [PATCH] NIDAnalyzer: use proper function for logging whoopsie --- src/main/java/vitaloaderredux/analyzer/NIDAnalyzer.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/vitaloaderredux/analyzer/NIDAnalyzer.java b/src/main/java/vitaloaderredux/analyzer/NIDAnalyzer.java index b37b00e..75522de 100644 --- a/src/main/java/vitaloaderredux/analyzer/NIDAnalyzer.java +++ b/src/main/java/vitaloaderredux/analyzer/NIDAnalyzer.java @@ -78,6 +78,7 @@ public static enum DatabaseSource { Environment //User-provided database, chosen via an environment variable } + private MessageLog logger; private NIDDatabase database; private ProgramProcessingHelper helper; @@ -167,8 +168,9 @@ private void analyzeFunction(IEType importOrExport, String libraryName, Address //Set name for the thunk too Function thunk = func.getThunkedFunction(true); if (thunk == null) { - helper.logf("Import thunk for %s_%08X (%s) not found (bug?)", - libraryName, functionNID, databaseName); + log.appendMsg(String.format( + "Import thunk for %s_%08X (%s) not found (bug?)", + libraryName, functionNID, databaseName)); } else { thunk.setName(databaseName, SourceType.ANALYSIS); } @@ -204,6 +206,7 @@ private void analyzeVariable(IEType importOrExport, String libraryName, Address public boolean added(Program program, AddressSetView set, TaskMonitor monitor, MessageLog log) throws CancelledException { + logger = log; helper = new ProgramProcessingHelper(program); knownFunctionsList = new ArrayList(); knownVariablesList = new ArrayList();