Skip to content

Commit

Permalink
Fix snprintf format specifier
Browse files Browse the repository at this point in the history
  • Loading branch information
kawaii-ghost authored and dacap committed Jun 27, 2024
1 parent 5f9189c commit 87fe104
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion base/mem_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ string get_pretty_memory_size(size_t memsize)
char buf[256];

if (memsize < 1000) {
std::snprintf(buf, sizeof(buf), "%lu bytes", memsize);
std::snprintf(buf, sizeof(buf), "%zu bytes", memsize);
}
else if (memsize < 1000*1000) {
std::snprintf(buf, sizeof(buf), "%0.1fK", memsize/1024.0f);
Expand Down

0 comments on commit 87fe104

Please sign in to comment.