summaryrefslogtreecommitdiffstats
path: root/generic/tclCmdMZ.c
diff options
context:
space:
mode:
authorhobbs <hobbs>2002-06-19 22:38:38 (GMT)
committerhobbs <hobbs>2002-06-19 22:38:38 (GMT)
commitdd5ca3e8633f089cd66042b1ea81da55c5679088 (patch)
treecd28049eaa64808049ede361b6b45e4945fdb5ca /generic/tclCmdMZ.c
parent0525cf179d915891c47d8f81c88ee46b4c1d65ed (diff)
downloadtcl-dd5ca3e8633f089cd66042b1ea81da55c5679088.zip
tcl-dd5ca3e8633f089cd66042b1ea81da55c5679088.tar.gz
tcl-dd5ca3e8633f089cd66042b1ea81da55c5679088.tar.bz2
* generic/tclCmdMZ.c (Tcl_RegexpObjCmd): get the resultPtr again
as the Tcl_ObjSetVar2 may cause the result to change. [Patch #558324] (watson)
Diffstat (limited to 'generic/tclCmdMZ.c')
-rw-r--r--generic/tclCmdMZ.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c
index 59346b4..ee37ff2 100644
--- a/generic/tclCmdMZ.c
+++ b/generic/tclCmdMZ.c
@@ -14,7 +14,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.72 2002/06/17 22:52:51 hobbs Exp $
+ * RCS: @(#) $Id: tclCmdMZ.c,v 1.73 2002/06/19 22:38:39 hobbs Exp $
*/
#include "tclInt.h"
@@ -484,9 +484,12 @@ Tcl_RegexpObjCmd(dummy, interp, objc, objv)
* Set the interpreter's object result to an integer object
* with value 1 if -all wasn't specified, otherwise it's all-1
* (the number of times through the while - 1).
+ * Get the resultPtr again as the Tcl_ObjSetVar2 above may have
+ * cause the result to change. [Patch #558324] (watson).
*/
if (!doinline) {
+ resultPtr = Tcl_GetObjResult(interp);
Tcl_SetIntObj(resultPtr, (all ? all-1 : 1));
}
return TCL_OK;