summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Jung <flo@thinkpad.(none)>2011-01-14 13:58:36 +0100
committerFlorian Jung <flo@thinkpad.(none)>2011-01-14 13:58:36 +0100
commit44ee8359ded9a47d445bc2c61daf3dd1db4bbd46 (patch)
treeb9c7985ad40e7084ec02e76525743b3ad4d1a6b1
parent4681a24d43cf1ec03751f271c1ed1eafd9c80a29 (diff)
Fixed bug in in-synth-cli (reload)
Now the number is first parsed (via atoi) and THEN checked if in 0..127
-rw-r--r--synth/in_synth_cli.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/synth/in_synth_cli.cpp b/synth/in_synth_cli.cpp
index ece806b..510d93d 100644
--- a/synth/in_synth_cli.cpp
+++ b/synth/in_synth_cli.cpp
@@ -107,11 +107,9 @@ void do_in_synth_cli()
cout << "error: expected program-number, found '"<<params<<"'"<<endl;
else
{
+ num=atoi(params.c_str());
if ((num>=0) && (num<128))
- {
- num=atoi(params.c_str());
lock_and_load_program(num, programfile[num]);
- }
else
cout << "error: program-number must be one of 0..127" << endl;
}