diff options
author | xsmile | 2018-08-29 20:17:55 +0200 |
---|---|---|
committer | xsmile | 2018-08-29 20:17:55 +0200 |
commit | c266b2607589efe612c3b09b306eac9706e17c76 (patch) | |
tree | cb2309668c72d81f01699da68664175324703ec6 /ui_pyroscope.cc | |
parent | 638b20b462f1d0867c3347c32644717fd8411007 (diff) | |
download | aur-c266b2607589efe612c3b09b306eac9706e17c76.tar.gz |
update
Diffstat (limited to 'ui_pyroscope.cc')
-rw-r--r-- | ui_pyroscope.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ui_pyroscope.cc b/ui_pyroscope.cc index d9dd1edd00a8..5ecc7e775e4b 100644 --- a/ui_pyroscope.cc +++ b/ui_pyroscope.cc @@ -494,7 +494,7 @@ static void decorate_download_title(Window* window, display::Canvas* canvas, cor // show ratio progress by color (ratio is scaled x1000) static int ratio_color(int ratio) { int rcol = sizeof(ratio_col) / sizeof(*ratio_col) - 1; - return ratio_col[std::min(rcol, ratio * rcol / 1200)]; + return ratio_col[std::min(rcol, std::max(0, ratio) * rcol / 1200)]; } |