diff options
author | Pavel Vymetálek <pavel@vym.cz> | 2021-01-20 13:31:57 +0100 |
---|---|---|
committer | Pavel Vymetálek <pavel@vym.cz> | 2021-01-20 13:31:57 +0100 |
commit | 139969ef7b0ac660853899ac601bab330c111f71 (patch) | |
tree | 1288d9298f2ffbe00466c64f58d7ccdb59f202f1 /sercp.c | |
parent | 8679629f8c9f6a45b3b44ca2f2f613232b7607dd (diff) | |
download | sercp-pc-139969ef7b0ac660853899ac601bab330c111f71.tar.gz |
Fixed integer rounding - progress show 100% at the finishv0.3.6
Diffstat (limited to 'sercp.c')
-rw-r--r-- | sercp.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -68,7 +68,7 @@ #define FALSE 0 #define true 1 #define TRUE 1 -const char* _version = "v0.3.5"; +const char* _version = "v0.3.6"; // SERIAL FILE *tapout_fd = NULL; int is_outfile = 0; @@ -293,7 +293,7 @@ void DoProgress(size_t pos, size_t max, unsigned char csum_ok) { char progress_char; p = pos; m = max; - percent = 100 / m * p; + percent = (100 / m * p) + 0.5; ipercent = percent / 100 * imax; if (is_binary) progress_char = '#'; else progress_char = '='; |