summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
Diffstat (limited to 'generic')
-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;