mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-01 18:42:40 +00:00
fix crash when adding/cloning more than 32 chips
This commit is contained in:
parent
fb16897e76
commit
9c42d3a7b3
1 changed files with 2 additions and 2 deletions
|
@ -1095,7 +1095,7 @@ bool DivEngine::changeSystem(int index, DivSystem which, bool preserveOrder) {
|
|||
}
|
||||
|
||||
bool DivEngine::addSystem(DivSystem which) {
|
||||
if (song.systemLen>DIV_MAX_CHIPS) {
|
||||
if (song.systemLen>=DIV_MAX_CHIPS) {
|
||||
lastError=fmt::sprintf("max number of systems is %d",DIV_MAX_CHIPS);
|
||||
return false;
|
||||
}
|
||||
|
@ -1149,7 +1149,7 @@ bool DivEngine::duplicateSystem(int index, bool pat, bool end) {
|
|||
lastError="invalid index";
|
||||
return false;
|
||||
}
|
||||
if (song.systemLen>DIV_MAX_CHIPS) {
|
||||
if (song.systemLen>=DIV_MAX_CHIPS) {
|
||||
lastError=fmt::sprintf("max number of systems is %d",DIV_MAX_CHIPS);
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue