mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Add a MSVC / Windows compatible snprintf function (#7353)
Use sizeof where applicable for mt_snprintf
This commit is contained in:
parent
9855651c06
commit
9537cfd3f8
13 changed files with 54 additions and 18 deletions
|
@ -33,6 +33,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
#ifndef SERVER
|
||||
#include "mapblock_mesh.h"
|
||||
#endif
|
||||
#include "porting.h"
|
||||
#include "util/string.h"
|
||||
#include "util/serialize.h"
|
||||
#include "util/basic_macros.h"
|
||||
|
@ -797,7 +798,7 @@ std::string analyze_block(MapBlock *block)
|
|||
|
||||
v3s16 p = block->getPos();
|
||||
char spos[25];
|
||||
snprintf(spos, sizeof(spos), "(%2d,%2d,%2d), ", p.X, p.Y, p.Z);
|
||||
porting::mt_snprintf(spos, sizeof(spos), "(%2d,%2d,%2d), ", p.X, p.Y, p.Z);
|
||||
desc<<spos;
|
||||
|
||||
switch(block->getModified())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue