diff options
author | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-06-27 20:23:44 +1000 |
---|---|---|
committer | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-06-27 20:23:44 +1000 |
commit | 332983c97b7a729c4dc5f19aa9ee4a22c420f7d8 (patch) | |
tree | fd9c441b796b522bdd5c7f8fbd32f51b8eff2a28 /source/core/StarLua.cpp | |
parent | 14b9689b6d4f4ad5276c88130dc6e449bedc0709 (diff) |
The Formatting String Catastrophe
Diffstat (limited to 'source/core/StarLua.cpp')
-rw-r--r-- | source/core/StarLua.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/core/StarLua.cpp b/source/core/StarLua.cpp index 6034c06..eb8541c 100644 --- a/source/core/StarLua.cpp +++ b/source/core/StarLua.cpp @@ -65,7 +65,7 @@ LuaCallbacks& LuaCallbacks::merge(LuaCallbacks const& callbacks) { for (auto const& pair : callbacks.m_callbacks) m_callbacks.add(pair.first, pair.second); } catch (MapException const& e) { - throw LuaException(strf("Failed to merge LuaCallbacks: %s", outputException(e, true))); + throw LuaException(strf("Failed to merge LuaCallbacks: {}", outputException(e, true))); } return *this; @@ -481,7 +481,7 @@ void LuaEngine::threadPushFunction(int threadIndex, int functionIndex) { int status = lua_status(thread); lua_Debug ar; if (status != LUA_OK || lua_getstack(thread, 0, &ar) > 0 || lua_gettop(thread) > 0) - throw LuaException(strf("Cannot push function to active or errored thread with status %s", status)); + throw LuaException(strf("Cannot push function to active or errored thread with status {}", status)); pushHandle(thread, functionIndex); } @@ -633,9 +633,9 @@ void LuaEngine::handleError(lua_State* state, int res) { String error; if (lua_isstring(state, -1)) - error = strf("Error code %s, %s", res, lua_tostring(state, -1)); + error = strf("Error code {}, {}", res, lua_tostring(state, -1)); else - error = strf("Error code %s, <unknown error>", res); + error = strf("Error code {}, <unknown error>", res); lua_pop(state, 1); |