mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-13 11:29:58 +03:00
Fix searching a resource (#13826)
If you add a new resource whose name starts with an existing resource name it won't be found. For example if you add `PWM_EX` resource after `PWM` you won't be able to store a pin into it. So when you execute `resource PWM_EX 1 A01` it will be stored into `PWM`.
This commit is contained in:
parent
91439e0ac2
commit
fcecabf01e
1 changed files with 1 additions and 1 deletions
|
@ -6050,7 +6050,7 @@ static void cliResource(const char *cmdName, char *cmdline)
|
|||
}
|
||||
|
||||
const char *resourceName = ownerNames[resourceTable[resourceIndex].owner];
|
||||
if (strncasecmp(pch, resourceName, strlen(resourceName)) == 0) {
|
||||
if (strcasecmp(pch, resourceName) == 0) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue