From 7bc60c29904423284602b6a36dc34738eb1800ef Mon Sep 17 00:00:00 2001 From: hobbs Date: Wed, 19 Jun 2002 22:38:38 +0000 Subject: * generic/tclCmdMZ.c (Tcl_RegexpObjCmd): get the resultPtr again as the Tcl_ObjSetVar2 may cause the result to change. [Patch #558324] (watson) FossilOrigin-Name: 1a723fe8cb3db609d18319e3e423384eb766fca4 --- ChangeLog | 6 ++++++ generic/tclCmdMZ.c | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 65845c5..fbe1e1f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2002-06-19 Jeff Hobbs + + * generic/tclCmdMZ.c (Tcl_RegexpObjCmd): get the resultPtr again + as the Tcl_ObjSetVar2 may cause the result to change. + [Patch #558324] (watson) + 2002-06-19 Miguel Sofer * generic/tclExecute.c (TEBC): removing unused "for(;;)" loop; 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; -- cgit v0.12