mirror of
https://github.com/Lekensteyn/ltunify.git
synced 2025-12-09 02:03:22 +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;
|
||||
}
|
||||
device_index = strtoul((*args)[1], &end, 0);
|
||||
if (end != '\0') {
|
||||
if (*end != '\0') {
|
||||
if (device_type_from_str((*args)[1]) == -1) {
|
||||
fprintf(stderr, "Invalid device type. Valid types are:\n");
|
||||
print_device_types();
|
||||
|
||||
Reference in New Issue
Block a user