diff options
author | stanton <stanton> | 1999-05-06 22:50:02 (GMT) |
---|---|---|
committer | stanton <stanton> | 1999-05-06 22:50:02 (GMT) |
commit | b8db0c357b9733ddc2471eda9f5b7581aa319ac8 (patch) | |
tree | 6a06b39323901b3b57e1ebfa8dd85c045ffef4d8 /generic | |
parent | e8006c8de91a1ab64d7cf87e09652943739e6576 (diff) | |
download | tcl-b8db0c357b9733ddc2471eda9f5b7581aa319ac8.zip tcl-b8db0c357b9733ddc2471eda9f5b7581aa319ac8.tar.gz tcl-b8db0c357b9733ddc2471eda9f5b7581aa319ac8.tar.bz2 |
* tests/string.test:
* generic/tclCmdMZ.c:
* doc/string.n: Fixed bug in string equal/compare code when using
-length option. Cleaned up docs a bit more.
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclCmdMZ.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index dddad59..dc5607c 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdMZ.c,v 1.7 1999/05/06 19:21:11 stanton Exp $ + * RCS: @(#) $Id: tclCmdMZ.c,v 1.8 1999/05/06 22:50:03 stanton Exp $ */ #include "tclInt.h" @@ -879,7 +879,7 @@ Tcl_StringObjCmd(dummy, interp, objc, objv) * Anything matches at 0 chars, right? */ match = 0; - } else if (nocase || ((reqlength > 0) && (reqlength < length))) { + } else if (nocase || ((reqlength > 0) && (reqlength <= length))) { /* * with -nocase or -length we have to check true char length * as it could be smaller than expected @@ -901,7 +901,7 @@ Tcl_StringObjCmd(dummy, interp, objc, objv) match = Tcl_UtfNcmp(string1, string2, (unsigned) length); } - if ((match == 0) && (reqlength >= length)) { + if ((match == 0) && (reqlength > length)) { match = length1 - length2; } } else { |