diff options
| author | Florian Jung <flo@thinkpad.(none)> | 2011-01-14 13:58:36 +0100 | 
|---|---|---|
| committer | Florian Jung <flo@thinkpad.(none)> | 2011-01-14 13:58:36 +0100 | 
| commit | 44ee8359ded9a47d445bc2c61daf3dd1db4bbd46 (patch) | |
| tree | b9c7985ad40e7084ec02e76525743b3ad4d1a6b1 | |
| parent | 4681a24d43cf1ec03751f271c1ed1eafd9c80a29 (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.cpp | 4 | 
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;  			}  | 
