diff --git a/src/engine/engine.cpp b/src/engine/engine.cpp index 4791bd2d..6ab8f648 100644 --- a/src/engine/engine.cpp +++ b/src/engine/engine.cpp @@ -1747,7 +1747,7 @@ bool DivEngine::removeSystem(int index, bool preserveOrder) { // patchbay for (size_t i=0; i>20)&0xfff)==index) { + if (((song.patchbay[i]>>20)&0xfff)==(unsigned int)index) { song.patchbay.erase(song.patchbay.begin()+i); i--; } @@ -1897,9 +1897,9 @@ bool DivEngine::swapSystem(int src, int dest, bool preserveOrder) { // patchbay for (unsigned int& i: song.patchbay) { - if (((i>>20)&0xfff)==src) { + if (((i>>20)&0xfff)==(unsigned int)src) { i=(i&(~0xfff00000))|((unsigned int)dest<<20); - } else if (((i>>20)&0xfff)==dest) { + } else if (((i>>20)&0xfff)==(unsigned int)dest) { i=(i&(~0xfff00000))|((unsigned int)src<<20); } }