Skip to content

Commit

Permalink
database: fix incorrect calculation of supported presets
Browse files Browse the repository at this point in the history
  • Loading branch information
paradajz committed Mar 10, 2021
1 parent 0561bb8 commit 50f6bd7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/application/database/Database.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ bool Database::init()

//limit the address space to max 14-bit MIDI value
const uint32_t maxAddress = 16383;
uint16_t maxPresets = (maxAddress / LESSDB::lastParameterAddress()) - _userDataStartAddress;
uint16_t maxPresets = maxAddress / (LESSDB::lastParameterAddress() - _userDataStartAddress);

//get theoretical maximum of presets
_supportedPresets = (LESSDB::dbSize() - systemBlockUsage) / (LESSDB::currentDBsize() - systemBlockUsage);
Expand Down

0 comments on commit 50f6bd7

Please sign in to comment.