Merge pull request #48 from paller/tools

Correct index check in ratbag-command
This commit is contained in:
bentiss
2015-10-25 08:01:58 -04:00

View File

@@ -1457,7 +1457,7 @@ ratbag_cmd_profile_active_set(const struct ratbag_cmd *cmd,
}
num_profiles = ratbag_device_get_num_profiles(device);
if (index > num_profiles) {
if (index >= num_profiles) {
error("'%d' is not a valid profile\n", index);
goto out;
}