summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--firmware/common/strnatcmp.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/firmware/common/strnatcmp.c b/firmware/common/strnatcmp.c
index 3c98200f7e..09c331f914 100644
--- a/firmware/common/strnatcmp.c
+++ b/firmware/common/strnatcmp.c
@@ -67,8 +67,10 @@ nat_isspace(int a)
67#endif 67#endif
68 68
69static inline int 69static inline int
70nat_toupper(int a) 70nat_unify_case(int a)
71{ 71{
72 /* We use 'tolower' and not 'toupper' so that '_' gets sorted
73 before the letters */
72 return tolower(a); 74 return tolower(a);
73} 75}
74 76
@@ -170,8 +172,8 @@ static int strnatcmp0(char const *a, char const *b, int fold_case)
170 } 172 }
171 173
172 if (fold_case) { 174 if (fold_case) {
173 ca = nat_toupper(ca); 175 ca = nat_unify_case(ca);
174 cb = nat_toupper(cb); 176 cb = nat_unify_case(cb);
175 } 177 }
176 178
177 if (ca < cb) 179 if (ca < cb)