Properly detect the end of an emblem
This commit is contained in:
parent
66d076c119
commit
9a8e74cb0d
2 changed files with 4 additions and 2 deletions
|
@ -4,7 +4,9 @@
|
|||
|
||||
struct gargoyle_opt *gargoyle_find_brand(uint16_t optc, struct gargoyle_opt *optv, const char *brand) {
|
||||
for(; optc; optc -= 1, optv += 1) {
|
||||
if(gargoyle_cmp(brand, optv->brand, optv->brand_sz, GARGOYLE_CMP_FLXBL)) {
|
||||
uint8_t end = !*(brand + optv->brand_sz) || *(brand + optv->brand_sz) == '=';
|
||||
|
||||
if(gargoyle_cmp(brand, optv->brand, optv->brand_sz, GARGOYLE_CMP_FLXBL) && end) {
|
||||
return optv;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,5 +20,5 @@ uint8_t gargoyle_cmp(const char *s1, const char *s2, uint16_t len, uint8_t flags
|
|||
len -= 1;
|
||||
}
|
||||
|
||||
return *s1 == *s2;
|
||||
return 1;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue