zynaddsubfx

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

commit b9e7cb07bd00780967c68d17deab2190e18a604d
parent 6b9d9d6aaf8d33c6bb6353da82ad9bb66af1b2e0
Author: fundamental <mark.d.mccurry@gmail.com>
Date:   Wed, 18 Nov 2009 08:28:41 -0500

VirKeyboard: Fixed possible segfault

Fix to VirKeyboard, so invalid keys do not get registered.
Based upon recommendation by zenon48 in:
http://www.kvraudio.com/forum/viewtopic.php?t=266432

Diffstat:
MChangeLog | 3+++
Msrc/UI/VirKeyboard.fl | 2+-
2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog @@ -960,3 +960,6 @@ 28 Oct 2009 (Paul Nasca) - Disable "bw" control on Reverb when Bandwidth mode is not enabled + +18 Nov 2009 (Mark McCurry) + - Fixed segfault in VirKeyBoard diff --git a/src/UI/VirKeyboard.fl b/src/UI/VirKeyboard.fl @@ -138,7 +138,7 @@ if ((event==FL_PUSH)||(event==FL_DRAG)||(event==FL_RELEASE)){ }; }; - if (((event==FL_PUSH)||(event==FL_DRAG))&& + if ((keypos!=-1)&&((event==FL_PUSH)||(event==FL_DRAG))&& (Fl::event_shift()==0)) { presskey(kpos,1,1); };