zynaddsubfx

ZynAddSubFX open source synthesizer
Log | Files | Refs | Submodules | LICENSE

commit c876972e30c5ea180063b94af3b052a37db6553a
parent e9d4ef0da3d42a1628989b3eed6d9a098bbd6b1f
Author: fundamental <mark.d.mccurry@gmail.com>
Date:   Sun,  2 Oct 2016 15:53:12 -0400

Prevent Duplicate Watch Points

Diffstat:
Msrc/Synth/WatchPoint.cpp | 5+++++
1 file changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/Synth/WatchPoint.cpp b/src/Synth/WatchPoint.cpp @@ -69,6 +69,11 @@ WatchManager::WatchManager(thrlnk *link) void WatchManager::add_watch(const char *id) { + //Don't add duplicate watchs + for(int i=0; i<MAX_WATCH; ++i) + if(!strcmp(active_list[i], id)) + return; + //Apply to a free slot for(int i=0; i<MAX_WATCH; ++i) { if(!active_list[i][0]) {