mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-30 08:53:08 +01:00
Mackie Control: fix math error that tried to change bank to very high number
This commit is contained in:
parent
92dba5bfa3
commit
23041fda88
1 changed files with 5 additions and 1 deletions
|
|
@ -1301,7 +1301,11 @@ MackieControlProtocol::notify_remote_id_changed()
|
|||
|
||||
if (sorted.size() - _current_initial_bank < sz) {
|
||||
// but don't shift backwards past the zeroth channel
|
||||
switch_banks (max((Sorted::size_type) 0, sorted.size() - sz));
|
||||
if (sorted.size() < sz) { // avoid unsigned math mistake below
|
||||
switch_banks(0, true);
|
||||
} else {
|
||||
switch_banks (max((Sorted::size_type) 0, sorted.size() - sz), true);
|
||||
}
|
||||
} else {
|
||||
// Otherwise just refresh the current bank
|
||||
refresh_current_bank();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue