mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 17:01:08 +02:00
cc_frm_footer: ensure unsigned value for w_btn_tmp
Origin commit data
------------------
Commit: b337083558
Author: Thilo Graf <dbt@novatux.de>
Date: 2020-01-05 (Sun, 05 Jan 2020)
This commit is contained in:
@@ -279,6 +279,7 @@ void CComponentsFooter::setButtonLabels(const struct button_label_cc * const con
|
|||||||
//w_btn_tmp = w_btn;
|
//w_btn_tmp = w_btn;
|
||||||
for (i = 0; i < c_btns; i++){
|
for (i = 0; i < c_btns; i++){
|
||||||
w_btn_tmp -= c_btns;
|
w_btn_tmp -= c_btns;
|
||||||
|
w_btn_tmp = max(0, w_btn_tmp);
|
||||||
btn_container->getCCItem(i)->setWidth(w_btn_tmp); // value = 0 forces recalculation, refresh is required
|
btn_container->getCCItem(i)->setWidth(w_btn_tmp); // value = 0 forces recalculation, refresh is required
|
||||||
static_cast<CComponentsButton*>(btn_container->getCCItem(i))->Refresh();
|
static_cast<CComponentsButton*>(btn_container->getCCItem(i))->Refresh();
|
||||||
w_used_tmp -= max(0, btn_container->getCCItem(i)->getWidth());
|
w_used_tmp -= max(0, btn_container->getCCItem(i)->getWidth());
|
||||||
|
Reference in New Issue
Block a user