summaryrefslogtreecommitdiff
path: root/src/script/cpp_api
diff options
context:
space:
mode:
authornOOb3167 <nOOb3167@gmail.com>2018-07-22 21:56:06 +0200
committerSmallJoker <SmallJoker@users.noreply.github.com>2018-07-22 21:56:06 +0200
commit9537cfd3f8264700619f58d15741829489e1099e (patch)
tree36412677aba19e1a2037db7fad2f934a2daa5046 /src/script/cpp_api
parent9855651c06f84f29780cf6b25a392ac841b4630c (diff)
downloadminetest-9537cfd3f8264700619f58d15741829489e1099e.tar.gz
minetest-9537cfd3f8264700619f58d15741829489e1099e.tar.bz2
minetest-9537cfd3f8264700619f58d15741829489e1099e.zip
Add a MSVC / Windows compatible snprintf function (#7353)
Use sizeof where applicable for mt_snprintf
Diffstat (limited to 'src/script/cpp_api')
-rw-r--r--src/script/cpp_api/s_base.cpp2
1 files changed, 1 insertions, 1 deletions
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;
}