Cycles: Fix corner case of human readable number returning empty string

This commit is contained in:
Sergey Sharybin 2016-06-27 13:49:25 +05:00
parent f1253f5d2b
commit 4a641e3cbc
1 changed files with 5 additions and 1 deletions

View File

@ -260,7 +260,11 @@ string string_human_readable_size(size_t size)
string string_human_readable_number(size_t num)
{
/* add thousands separators */
if(num == 0) {
return "0";
}
/* Add thousands separators. */
char buf[32];
char* p = buf+31;