diff options
author | Loic Blot <loic.blot@unix-experience.fr> | 2017-06-20 00:19:29 +0200 |
---|---|---|
committer | Loic Blot <loic.blot@unix-experience.fr> | 2017-06-20 00:19:29 +0200 |
commit | b2977e769162e9dfc042e3c92932bfd42a86d2cb (patch) | |
tree | 10cfece523a436cfc5131536f66caa9d5820e7b0 | |
parent | b32f36bf34c9a3208b2c0261e0f541453b4459b6 (diff) | |
download | minetest-b2977e769162e9dfc042e3c92932bfd42a86d2cb.tar.gz minetest-b2977e769162e9dfc042e3c92932bfd42a86d2cb.tar.bz2 minetest-b2977e769162e9dfc042e3c92932bfd42a86d2cb.zip |
Fix 1 more warning reported by GCC
We don't write in correct buffer size in analyze_block
-rw-r--r-- | src/mapblock.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mapblock.cpp b/src/mapblock.cpp index 631e9db65..bf7f9dcd3 100644 --- a/src/mapblock.cpp +++ b/src/mapblock.cpp @@ -971,8 +971,8 @@ std::string analyze_block(MapBlock *block) std::ostringstream desc; v3s16 p = block->getPos(); - char spos[20]; - snprintf(spos, 20, "(%2d,%2d,%2d), ", p.X, p.Y, p.Z); + char spos[25]; + snprintf(spos, sizeof(spos), "(%2d,%2d,%2d), ", p.X, p.Y, p.Z); desc<<spos; switch(block->getModified()) |