From 9537cfd3f8264700619f58d15741829489e1099e Mon Sep 17 00:00:00 2001 From: nOOb3167 Date: Sun, 22 Jul 2018 21:56:06 +0200 Subject: Add a MSVC / Windows compatible snprintf function (#7353) Use sizeof where applicable for mt_snprintf --- src/script/cpp_api/s_base.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/script/cpp_api') diff --git a/src/script/cpp_api/s_base.cpp b/src/script/cpp_api/s_base.cpp index 293c774b0..d98359d20 100644 --- a/src/script/cpp_api/s_base.cpp +++ b/src/script/cpp_api/s_base.cpp @@ -293,7 +293,7 @@ void ScriptApiBase::stackDump(std::ostream &o) break; case LUA_TNUMBER: /* numbers */ { char buf[10]; - snprintf(buf, 10, "%lf", lua_tonumber(m_luastack, i)); + porting::mt_snprintf(buf, sizeof(buf), "%lf", lua_tonumber(m_luastack, i)); o << buf; break; } -- cgit v1.2.3