summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorhobbs <hobbs>2000-06-06 19:34:52 (GMT)
committerhobbs <hobbs>2000-06-06 19:34:52 (GMT)
commit1c4042062be55823ed8fe5e9d0f86e88d190b88d (patch)
tree27c4d2808eb30b613c6233f5f3f67cef05b6c818 /generic
parente112a3100eab65d51f74c378b94fdf1dd95b6cc8 (diff)
downloadtcl-1c4042062be55823ed8fe5e9d0f86e88d190b88d.zip
tcl-1c4042062be55823ed8fe5e9d0f86e88d190b88d.tar.gz
tcl-1c4042062be55823ed8fe5e9d0f86e88d190b88d.tar.bz2
* generic/tclExecute.c (TclExecuteByteCode INST_STR_CMP): added
test of iResult return from memcmp, as memcmp isn't required to return only -1,0,1.
Diffstat (limited to 'generic')
-rw-r--r--generic/tclExecute.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/generic/tclExecute.c b/generic/tclExecute.c
index 88b5299..782ea7d 100644
--- a/generic/tclExecute.c
+++ b/generic/tclExecute.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclExecute.c,v 1.13 2000/05/26 08:53:42 hobbs Exp $
+ * RCS: @(#) $Id: tclExecute.c,v 1.14 2000/06/06 19:34:52 hobbs Exp $
*/
#include "tclInt.h"
@@ -1814,6 +1814,10 @@ TclExecuteByteCode(interp, codePtr)
(size_t) ((s1len < s2len) ? s1len : s2len));
if (iResult == 0) {
iResult = s1len - s2len;
+ } else if (iResult < 0) {
+ iResult = -1;
+ } else {
+ iResult = 1;
}
PUSH_OBJECT(Tcl_NewIntObj(iResult));