mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-01 19:07:45 +08:00
Fix parameter range check
This commit is contained in:
@@ -874,7 +874,7 @@ ToneAlarm::ioctl(file *filp, int cmd, unsigned long arg)
|
|||||||
case TONE_SET_ALARM:
|
case TONE_SET_ALARM:
|
||||||
debug("TONE_SET_ALARM %u", arg);
|
debug("TONE_SET_ALARM %u", arg);
|
||||||
|
|
||||||
if (arg <= TONE_NUMBER_OF_TUNES) {
|
if (arg < TONE_NUMBER_OF_TUNES) {
|
||||||
if (arg == 0) {
|
if (arg == 0) {
|
||||||
// stop the tune
|
// stop the tune
|
||||||
_tune = nullptr;
|
_tune = nullptr;
|
||||||
|
|||||||
Reference in New Issue
Block a user