-@@ -2224,7 +2225,7 @@ int f_name_cmp(struct file_struct *f1, s
- if (type1 != type2)
- return type1 == t_PATH ? 1 : -1;
-
-- do {
-+ while (1) {
- if (!*c1) {
- switch (state1) {
- case s_DIR:
-@@ -2287,7 +2288,16 @@ int f_name_cmp(struct file_struct *f1, s
+@@ -2390,7 +2391,7 @@ enum fnc_type { t_PATH, t_ITEM };
+ int f_name_cmp(struct file_struct *f1, struct file_struct *f2)
+ {
+ int dif;
+- const uchar *c1, *c2;
++ const uchar *c1, *c2, ch1, ch2;
+ enum fnc_state state1, state2;
+ enum fnc_type type1, type2;
+ enum fnc_type t_path = protocol_version >= 29 ? t_PATH : t_ITEM;
+@@ -2500,7 +2501,15 @@ int f_name_cmp(struct file_struct *f1, s