forked from KolibriOS/kolibrios
fix ConvertSizeToKb() function for case when size is less than 1Kb
git-svn-id: svn://kolibrios.org@6568 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
@@ -307,9 +307,17 @@ enum
|
||||
unsigned int kb;
|
||||
dword kb_line;
|
||||
|
||||
kb_line = itoa(bytes / 1024);
|
||||
strcpy(#size, kb_line);
|
||||
strcat(#size, " Kb");
|
||||
if (bytes >= 1024)
|
||||
{
|
||||
kb_line = itoa(bytes / 1024);
|
||||
strcpy(#size, kb_line);
|
||||
strcat(#size, " Kb");
|
||||
}
|
||||
else {
|
||||
kb_line = itoa(bytes);
|
||||
strcpy(#size, kb_line);
|
||||
strcat(#size, " b");
|
||||
}
|
||||
|
||||
return #size;
|
||||
}
|
||||
|
Reference in New Issue
Block a user