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/StarMultiArray.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/core/StarMultiArray.hpp') diff --git a/source/core/StarMultiArray.hpp b/source/core/StarMultiArray.hpp index f2cf155..3668c8a 100644 --- a/source/core/StarMultiArray.hpp +++ b/source/core/StarMultiArray.hpp @@ -291,7 +291,7 @@ template Element const& MultiArray::at(IndexArray const& index) const { for (size_t i = Rank; i != 0; --i) { if (index[i - 1] >= m_shape[i - 1]) - throw MultiArrayException(strf("Out of bounds on MultiArray::at(%s)", index)); + throw MultiArrayException(strf("Out of bounds on MultiArray::at({})", index)); } return m_data[storageIndex(index)]; @@ -301,7 +301,7 @@ template Element& MultiArray::at(IndexArray const& index) { for (size_t i = Rank; i != 0; --i) { if (index[i - 1] >= m_shape[i - 1]) - throw MultiArrayException(strf("Out of bounds on MultiArray::at(%s)", index)); + throw MultiArrayException(strf("Out of bounds on MultiArray::at({})", index)); } return m_data[storageIndex(index)]; @@ -323,7 +323,7 @@ template void MultiArray::set(IndexArray const& index, Element element) { for (size_t i = Rank; i != 0; --i) { if (index[i - 1] >= m_shape[i - 1]) - throw MultiArrayException(strf("Out of bounds on MultiArray::set(%s)", index)); + throw MultiArrayException(strf("Out of bounds on MultiArray::set({})", index)); } m_data[storageIndex(index)] = move(element); -- cgit v1.2.3