mirror of
https://github.com/Lekensteyn/ltunify.git
synced 2025-12-10 02:15:34 +00:00
ltunify: fix device type validation
This commit is contained in:
@@ -952,7 +952,7 @@ static int validate_args(int argc, char **argv, char ***args, char **hidraw_path
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
device_index = strtoul((*args)[1], &end, 0);
|
device_index = strtoul((*args)[1], &end, 0);
|
||||||
if (end != '\0') {
|
if (*end != '\0') {
|
||||||
if (device_type_from_str((*args)[1]) == -1) {
|
if (device_type_from_str((*args)[1]) == -1) {
|
||||||
fprintf(stderr, "Invalid device type. Valid types are:\n");
|
fprintf(stderr, "Invalid device type. Valid types are:\n");
|
||||||
print_device_types();
|
print_device_types();
|
||||||
|
|||||||
Reference in New Issue
Block a user