diff options
author | dgp <dgp@users.sourceforge.net> | 2017-02-16 18:48:56 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2017-02-16 18:48:56 (GMT) |
commit | 674ed242bc26f2a7d7e773dfd456fd95164f8bac (patch) | |
tree | 9940afb84ebd36d050d00448f4c79363c87ecac5 /generic/tclHistory.c | |
parent | 44a6a03d757bee64987fa31d866bf56b2f2e143c (diff) | |
parent | 3b5e7e9792b9b34111146557a3353756711b8133 (diff) | |
download | tcl-674ed242bc26f2a7d7e773dfd456fd95164f8bac.zip tcl-674ed242bc26f2a7d7e773dfd456fd95164f8bac.tar.gz tcl-674ed242bc26f2a7d7e773dfd456fd95164f8bac.tar.bz2 |
merge trunk
Diffstat (limited to 'generic/tclHistory.c')
-rw-r--r-- | generic/tclHistory.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/generic/tclHistory.c b/generic/tclHistory.c index b08e352..47806d4 100644 --- a/generic/tclHistory.c +++ b/generic/tclHistory.c @@ -62,15 +62,14 @@ Tcl_RecordAndEval( * instead of Tcl_Eval. */ { register Tcl_Obj *cmdPtr; - int length = strlen(cmd); int result; - if (length > 0) { + if (cmd[0]) { /* * Call Tcl_RecordAndEvalObj to do the actual work. */ - cmdPtr = Tcl_NewStringObj(cmd, length); + cmdPtr = Tcl_NewStringObj(cmd, -1); Tcl_IncrRefCount(cmdPtr); result = Tcl_RecordAndEvalObj(interp, cmdPtr, flags); |