diff options
author | nOOb3167 <nOOb3167@gmail.com> | 2018-07-22 21:56:06 +0200 |
---|---|---|
committer | SmallJoker <SmallJoker@users.noreply.github.com> | 2018-07-22 21:56:06 +0200 |
commit | 9537cfd3f8264700619f58d15741829489e1099e (patch) | |
tree | 36412677aba19e1a2037db7fad2f934a2daa5046 /src/mapblock.cpp | |
parent | 9855651c06f84f29780cf6b25a392ac841b4630c (diff) | |
download | minetest-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/mapblock.cpp')
-rw-r--r-- | src/mapblock.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mapblock.cpp b/src/mapblock.cpp index 54cb2df0e..cf815d16b 100644 --- a/src/mapblock.cpp +++ b/src/mapblock.cpp @@ -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()) |