diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2014-05-01 15:16:37 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2014-05-01 15:16:37 (GMT) |
commit | ecc261fff02041b94a2ff589a0f7b7191a6cf975 (patch) | |
tree | caab1eb18613bb672c08214eab97c65743f7587e /generic/tclExecute.c | |
parent | 1f6f16eb0acd800c01eb3eb44390f314983b353f (diff) | |
parent | 09c394df7d97291aecb28a07a6c5de3f0814a341 (diff) | |
download | tcl-ecc261fff02041b94a2ff589a0f7b7191a6cf975.zip tcl-ecc261fff02041b94a2ff589a0f7b7191a6cf975.tar.gz tcl-ecc261fff02041b94a2ff589a0f7b7191a6cf975.tar.bz2 |
merge trunk
Diffstat (limited to 'generic/tclExecute.c')
-rw-r--r-- | generic/tclExecute.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 25f4951..689fbe9 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -5570,11 +5570,21 @@ TEBCresume( length - toIdx); } } else { - objResultPtr = value3Ptr; + /* + * Be careful with splicing the stack in this case; we have a + * refCount:1 object in value3Ptr and we want to append to it and + * make it be the refCount:1 object at the top of the stack + * afterwards. [Bug 82e7f67325] + */ + if (toIdx < length) { - Tcl_AppendUnicodeToObj(objResultPtr, ustring1 + toIdx + 1, + Tcl_AppendUnicodeToObj(value3Ptr, ustring1 + toIdx + 1, length - toIdx); } + TRACE_APPEND(("\"%.30s\"\n", O2S(value3Ptr))); + TclDecrRefCount(valuePtr); + OBJ_AT_TOS = value3Ptr; /* Tricky! */ + NEXT_INST_F(1, 0, 0); } TclDecrRefCount(value3Ptr); TRACE_APPEND(("\"%.30s\"\n", O2S(objResultPtr))); |