From 332983c97b7a729c4dc5f19aa9ee4a22c420f7d8 Mon Sep 17 00:00:00 2001 From: Kae <80987908+Novaenia@users.noreply.github.com> Date: Tue, 27 Jun 2023 20:23:44 +1000 Subject: The Formatting String Catastrophe --- source/game/scripting/StarLuaComponents.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/game/scripting/StarLuaComponents.hpp') diff --git a/source/game/scripting/StarLuaComponents.hpp b/source/game/scripting/StarLuaComponents.hpp index dec2b23..f370679 100644 --- a/source/game/scripting/StarLuaComponents.hpp +++ b/source/game/scripting/StarLuaComponents.hpp @@ -184,7 +184,7 @@ Maybe LuaBaseComponent::invoke(String const& name, V&&... args) { return {}; return m_context->luaTo(move(method)).invoke(forward(args)...); } catch (LuaException const& e) { - Logger::error("Exception while invoking lua function '%s'. %s", name, outputException(e, true)); + Logger::error("Exception while invoking lua function '{}'. {}", name, outputException(e, true)); setError(printException(e, false)); return {}; } @@ -198,7 +198,7 @@ Maybe LuaBaseComponent::eval(String const& code) { try { return m_context->eval(code); } catch (LuaException const& e) { - Logger::error("Exception while evaluating lua in context: %s", outputException(e, true)); + Logger::error("Exception while evaluating lua in context: {}", outputException(e, true)); return {}; } } @@ -316,7 +316,7 @@ Maybe LuaMessageHandlingComponent::handleMessage( return handler->template invoke(message, localMessage, luaUnpack(args)); } catch (LuaException const& e) { Logger::error( - "Exception while invoking lua message handler for message '%s'. %s", message, outputException(e, true)); + "Exception while invoking lua message handler for message '{}'. {}", message, outputException(e, true)); Base::setError(String(printException(e, false))); } } -- cgit v1.2.3