* grub-core/fs/bfs.c (bfs_strcmp) [MODE_AFS]: Use signed comparison.
This commit is contained in:
parent
1796965f6c
commit
0a308f64e9
2 changed files with 12 additions and 1 deletions
|
@ -519,10 +519,17 @@ bfs_strcmp (const char *a, const char *b, grub_size_t alen)
|
|||
alen--;
|
||||
}
|
||||
|
||||
#ifdef MODE_AFS
|
||||
if (!alen)
|
||||
return - (int) (grub_uint8_t) *b;
|
||||
return - (int) (grub_int8_t) *b;
|
||||
|
||||
return (int) (grub_int8_t) *a - (int) (grub_int8_t) *b;
|
||||
#else
|
||||
if (!alen)
|
||||
return - (int) (grub_uint8_t) *b;
|
||||
|
||||
return (int) (grub_uint8_t) *a - (int) (grub_uint8_t) *b;
|
||||
#endif
|
||||
}
|
||||
|
||||
static grub_err_t
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue