This website works better with JavaScript.
Home
Help
Sign In
VCVRack
/
Rack
mirror of
https://github.com/VCVRack/Rack.git
Watch
1
Star
0
Fork
0
Code
Issues
0
Releases
43
Wiki
Activity
Browse Source
Add another check for invalid input
(std::stoi ignores subsequent symbols)
tags/v0.4.0
ben
7 years ago
parent
adec9fa265
commit
5e16c84720
1 changed files
with
1 additions
and
1 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+1
-1
src/core/MidiInterface.cpp
+ 1
- 1
src/core/MidiInterface.cpp
View File
@@ -629,7 +629,7 @@ void CCTextField::draw(NVGcontext *vg) {
try {
*ccNum = std::stoi(text);
// Only allow valid cc numbers
if (*ccNum < 0 || *ccNum > 127) {
if (*ccNum < 0 || *ccNum > 127
|| text.size() > 3
) {
text = "";
begin = end = 0;
}
Write
Preview
Loading…
Cancel
Save