summaryrefslogtreecommitdiffstats
path: root/generic/tclUtf.c
diff options
context:
space:
mode:
authorstanton <stanton>1999-06-02 20:21:24 (GMT)
committerstanton <stanton>1999-06-02 20:21:24 (GMT)
commit079a1bc35abbfedee3c3416098fdaee736d92d35 (patch)
treeab9ad86528b814b35f91d4686b5c3f9b8eeff89f /generic/tclUtf.c
parentb5c1be6c9518d4655a3e2ec49653ca6c98d95e4d (diff)
downloadtcl-079a1bc35abbfedee3c3416098fdaee736d92d35.zip
tcl-079a1bc35abbfedee3c3416098fdaee736d92d35.tar.gz
tcl-079a1bc35abbfedee3c3416098fdaee736d92d35.tar.bz2
* generic/tclUtf.c (Tcl_UtfNcasecmp): Fixed incorrect computation
of relative ordering. [Bug: 2135]
Diffstat (limited to 'generic/tclUtf.c')
-rw-r--r--generic/tclUtf.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/generic/tclUtf.c b/generic/tclUtf.c
index 635ffbe..c2abdae 100644
--- a/generic/tclUtf.c
+++ b/generic/tclUtf.c
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclUtf.c,v 1.7 1999/05/22 01:20:13 stanton Exp $
+ * RCS: @(#) $Id: tclUtf.c,v 1.8 1999/06/02 20:21:24 stanton Exp $
*/
#include "tclInt.h"
@@ -1133,9 +1133,12 @@ Tcl_UtfNcasecmp(cs, ct, n)
*/
cs += Tcl_UtfToUniChar(cs, &ch1);
ct += Tcl_UtfToUniChar(ct, &ch2);
- if ((ch1 != ch2) &&
- (Tcl_UniCharToLower(ch1) != Tcl_UniCharToLower(ch2))) {
- return (ch1 - ch2);
+ if (ch1 != ch2) {
+ ch1 = Tcl_UniCharToLower(ch1);
+ ch2 = Tcl_UniCharToLower(ch2);
+ if (ch1 != ch2) {
+ return (ch1 - ch2);
+ }
}
}
return 0;