mirror of
https://github.com/radareorg/radare2.git
synced 2025-04-01 17:11:51 +00:00
Fix progressbar rounding error
An extra char was added when the percentage was 100, caused by what I believe is a rounding error. An int is good enough here. By removing the double it fixes the min and max macros beeing used with a mix between integer and double, and the double beeing used in printf as a decimal value.
This commit is contained in:
parent
cbc5c77813
commit
a585dbc2d9
@ -1549,8 +1549,7 @@ static RPrint staticp = {
|
||||
};
|
||||
|
||||
/* TODO: handle screen width */
|
||||
R_API void r_print_progressbar(RPrint *p, int _pc, int _cols) {
|
||||
double pc = _pc;
|
||||
R_API void r_print_progressbar(RPrint *p, int pc, int _cols) {
|
||||
// TODO: add support for colors
|
||||
int i, cols = (_cols == -1)? 78: _cols;
|
||||
if (!p) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user