aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/fns.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/fns.c b/src/fns.c
index e987d64319f..9be42aa8b68 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -481,7 +481,7 @@ string_cmp (Lisp_Object string1, Lisp_Object string2)
481 int d = memcmp (SSDATA (string1), SSDATA (string2), n); 481 int d = memcmp (SSDATA (string1), SSDATA (string2), n);
482 if (d) 482 if (d)
483 return d; 483 return d;
484 return n < SCHARS (string2) ? -1 : n > SCHARS (string2); 484 return n < SCHARS (string2) ? -1 : n < SCHARS (string1);
485 } 485 }
486 else if (STRING_MULTIBYTE (string1) && STRING_MULTIBYTE (string2)) 486 else if (STRING_MULTIBYTE (string1) && STRING_MULTIBYTE (string2))
487 { 487 {
@@ -515,7 +515,7 @@ string_cmp (Lisp_Object string1, Lisp_Object string2)
515 515
516 if (b >= nb) 516 if (b >= nb)
517 /* One string is a prefix of the other. */ 517 /* One string is a prefix of the other. */
518 return b < nb2 ? -1 : b > nb2; 518 return b < nb2 ? -1 : b < nb1;
519 519
520 /* Now back up to the start of the differing characters: 520 /* Now back up to the start of the differing characters:
521 it's the last byte not having the bit pattern 10xxxxxx. */ 521 it's the last byte not having the bit pattern 10xxxxxx. */
@@ -540,7 +540,7 @@ string_cmp (Lisp_Object string1, Lisp_Object string2)
540 if (c1 != c2) 540 if (c1 != c2)
541 return c1 < c2 ? -1 : 1; 541 return c1 < c2 ? -1 : 1;
542 } 542 }
543 return i1 < SCHARS (string2) ? -1 : i1 > SCHARS (string2); 543 return i1 < SCHARS (string2) ? -1 : i1 < SCHARS (string1);
544 } 544 }
545 else 545 else
546 { 546 {
@@ -553,7 +553,7 @@ string_cmp (Lisp_Object string1, Lisp_Object string2)
553 if (c1 != c2) 553 if (c1 != c2)
554 return c1 < c2 ? -1 : 1; 554 return c1 < c2 ? -1 : 1;
555 } 555 }
556 return i1 < SCHARS (string2) ? -1 : i1 > SCHARS (string2); 556 return i1 < SCHARS (string2) ? -1 : i1 < SCHARS (string1);
557 } 557 }
558} 558}
559 559