summaryrefslogtreecommitdiffstats
path: root/generic/tclUtf.c
diff options
context:
space:
mode:
authorstanton <stanton@noemail.net>1999-06-02 20:21:24 (GMT)
committerstanton <stanton@noemail.net>1999-06-02 20:21:24 (GMT)
commitca1ec69accb33618f0be44f21c6c52c867911206 (patch)
treeab9ad86528b814b35f91d4686b5c3f9b8eeff89f /generic/tclUtf.c
parent8493a02ef4e57715b1587d10dbc001e01019a9e7 (diff)
downloadtcl-ca1ec69accb33618f0be44f21c6c52c867911206.zip
tcl-ca1ec69accb33618f0be44f21c6c52c867911206.tar.gz
tcl-ca1ec69accb33618f0be44f21c6c52c867911206.tar.bz2
* generic/tclUtf.c (Tcl_UtfNcasecmp): Fixed incorrect computation
of relative ordering. [Bug: 2135] FossilOrigin-Name: 58260de12dfa3fd98e161c35ea69b55df62bec82
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;