Skip to content

Commit b2977e7

Browse files
committedJun 19, 2017
Fix 1 more warning reported by GCC
We don't write in correct buffer size in analyze_block
1 parent b32f36b commit b2977e7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎src/mapblock.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -971,8 +971,8 @@ std::string analyze_block(MapBlock *block)
971971
std::ostringstream desc;
972972

973973
v3s16 p = block->getPos();
974-
char spos[20];
975-
snprintf(spos, 20, "(%2d,%2d,%2d), ", p.X, p.Y, p.Z);
974+
char spos[25];
975+
snprintf(spos, sizeof(spos), "(%2d,%2d,%2d), ", p.X, p.Y, p.Z);
976976
desc<<spos;
977977

978978
switch(block->getModified())

0 commit comments

Comments
 (0)
Please sign in to comment.