minimodem: fix --auto-carrier crash on positive-shift modes
This commit is contained in:
parent
d603fc444d
commit
9f1695a3b6
|
@ -878,8 +878,9 @@ main( int argc, char*argv[] )
|
||||||
b_shift *= -1;
|
b_shift *= -1;
|
||||||
/* only accept a carrier as b_mark if it will not result
|
/* only accept a carrier as b_mark if it will not result
|
||||||
* in a b_space band which is "too low". */
|
* in a b_space band which is "too low". */
|
||||||
if ( carrier_band + b_shift < 1 ) {
|
int b_space = carrier_band + b_shift;
|
||||||
debug_log("autodetected space band too low\n" );
|
if ( b_space < 1 || b_space >= fskp->nbands ) {
|
||||||
|
debug_log("autodetected space band out of range\n" );
|
||||||
carrier_band = -1;
|
carrier_band = -1;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue