mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 16:45:20 +02:00
Add a MSVC / Windows compatible snprintf function (#7353)
Use sizeof where applicable for mt_snprintf
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user