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/core/StarCasting.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/core/StarCasting.hpp') diff --git a/source/core/StarCasting.hpp b/source/core/StarCasting.hpp index 64305af..0c2ed12 100644 --- a/source/core/StarCasting.hpp +++ b/source/core/StarCasting.hpp @@ -61,11 +61,11 @@ shared_ptr as(shared_ptr const& p) { template auto convert(Ptr const& p) -> decltype(as(p)) { if (!p) - throw PointerConvertException::format("Could not convert from nullptr to %s", typeid(Type).name()); + throw PointerConvertException::format("Could not convert from nullptr to {}", typeid(Type).name()); else if (auto a = as(p)) return a; else - throw PointerConvertException::format("Could not convert from %s to %s", typeid(*p).name(), typeid(Type).name()); + throw PointerConvertException::format("Could not convert from {} to {}", typeid(*p).name(), typeid(Type).name()); } template -- cgit v1.2.3