notaz.gp2x.de
/
saturn.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
fix progress for small transfers
[saturn.git]
/
datalink.c
diff --git
a/datalink.c
b/datalink.c
index
a2bdc70
..
6a37179
100644
(file)
--- a/
datalink.c
+++ b/
datalink.c
@@
-107,6
+107,9
@@
static void print_progress(int done, int total)
printf("%06x/%06x |", done, total);
step = total / 20;
+ if (step <= 0)
+ step = 1;
+
for (i = step; i <= total; i += step)
printf("%c", done >= i ? '=' : '-');
printf("| %3d%%", done * 100 / total);