From 753955451b34c5194fb3c34fcd7b154405b03213 Mon Sep 17 00:00:00 2001 From: Qudix <17361645+Qudix@users.noreply.github.com> Date: Sat, 23 Sep 2023 17:45:06 -0500 Subject: [PATCH] fix!: consolelog print/vprint --- CommonLibSF/include/RE/C/ConsoleLog.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/CommonLibSF/include/RE/C/ConsoleLog.h b/CommonLibSF/include/RE/C/ConsoleLog.h index 3bc9a950..b27e5093 100644 --- a/CommonLibSF/include/RE/C/ConsoleLog.h +++ b/CommonLibSF/include/RE/C/ConsoleLog.h @@ -14,9 +14,17 @@ namespace RE return *singleton; } - void Print(const char* a_fmt, std::va_list a_args) + void Print(const char* a_fmt, ...) { - using func_t = decltype(&ConsoleLog::Print); + std::va_list args; + va_start(args, a_fmt); + VPrint(a_fmt, args); + va_end(args); + } + + void VPrint(const char* a_fmt, std::va_list a_args) + { + using func_t = decltype(&ConsoleLog::VPrint); REL::Relocation func{ REL::Offset(0x02883978) }; func(this, a_fmt, a_args); }