Skip to content

Commit

Permalink
Merge pull request #358 from inkdot7/decimal_busdev
Browse files Browse the repository at this point in the history
Parse USB bus:dev as decimal integers, to be consistent with `--scan-usb`.
  • Loading branch information
trabucayre authored Jul 29, 2023
2 parents 65b6c73 + bed17f3 commit baeb9d5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -895,9 +895,9 @@ int parse_opt(int argc, char **argv, struct arguments *args,
}
try {
args->bus_addr = static_cast<uint8_t>(std::stoi(bus_dev_num[0],
nullptr, 16));
nullptr, 10));
args->device_addr = static_cast<uint8_t>(
std::stoi(bus_dev_num[1], nullptr, 16));
std::stoi(bus_dev_num[1], nullptr, 10));
} catch (std::exception &e) {
printError("Error: busdev-num invalid format: must be numeric values");
throw std::exception();
Expand Down

0 comments on commit baeb9d5

Please sign in to comment.