mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-11 03:25:54 +02:00
installer: Fix off-by-one error in number search
This commit is contained in:
@@ -364,7 +364,7 @@ static int hw_device_has_p_suffix(const struct hw_destination* dest) {
|
||||
|
||||
// Devices with a number at the end have the p suffix, too.
|
||||
// e.g. mmcblk0, cciss0
|
||||
unsigned int last_char = strlen(dest->path);
|
||||
unsigned int last_char = strlen(dest->path) - 1;
|
||||
if ((dest->path[last_char] >= '0') && (dest->path[last_char] <= '9'))
|
||||
return 1;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user