Skip to content

Commit

Permalink
Fix 1 more warning reported by GCC
Browse files Browse the repository at this point in the history
We don't write in correct buffer size in analyze_block
  • Loading branch information
nerzhul committed Jun 19, 2017
1 parent b32f36b commit b2977e7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/mapblock.cpp
Expand Up @@ -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())
Expand Down

0 comments on commit b2977e7

Please sign in to comment.