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:
Kirill Lipatov (Leency) 2016-10-05 13:26:19 +00:00
parent edc6f75e77
commit 6091b058a0
2 changed files with 12 additions and 4 deletions

View File

@ -17,7 +17,7 @@
// // // //
//===================================================// //===================================================//
?define WINDOW_HEADER "Clipboard viewer v1.0" ?define WINDOW_HEADER "Clipboard viewer v1.01"
?define T_DELETE_LAST_SLOT "Delete last slot" ?define T_DELETE_LAST_SLOT "Delete last slot"
?define T_DELETE_ALL_SLOTS "Delete all slots" ?define T_DELETE_ALL_SLOTS "Delete all slots"
?define T_RESET_BUFFER_LOCK "Reset the lock buffer" ?define T_RESET_BUFFER_LOCK "Reset the lock buffer"

View File

@ -307,9 +307,17 @@ enum
unsigned int kb; unsigned int kb;
dword kb_line; dword kb_line;
kb_line = itoa(bytes / 1024); if (bytes >= 1024)
strcpy(#size, kb_line); {
strcat(#size, " Kb"); 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; return #size;
} }