mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 08:21:12 +02:00
cc_frm_footer: ensure unsigned value for w_btn_tmp
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