summaryrefslogtreecommitdiffstats
path: root/generic/tclCmdIL.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2002-04-18 14:12:07 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2002-04-18 14:12:07 (GMT)
commit99698119e81825308e2a3790fc046c4c9fe63b40 (patch)
tree79a8462334384e4c8831cc45887a5e04e182e0a0 /generic/tclCmdIL.c
parent85e2515f134ae9dee84eaab360465cc92116796f (diff)
downloadtcl-99698119e81825308e2a3790fc046c4c9fe63b40.zip
tcl-99698119e81825308e2a3790fc046c4c9fe63b40.tar.gz
tcl-99698119e81825308e2a3790fc046c4c9fe63b40.tar.bz2
Fixed Bug #545644; [info body] always gives a proper string now!
Diffstat (limited to 'generic/tclCmdIL.c')
-rw-r--r--generic/tclCmdIL.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c
index 405245a..3e1f0da 100644
--- a/generic/tclCmdIL.c
+++ b/generic/tclCmdIL.c
@@ -15,7 +15,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclCmdIL.c,v 1.42 2002/03/06 11:28:08 dkf Exp $
+ * RCS: @(#) $Id: tclCmdIL.c,v 1.43 2002/04/18 14:12:07 dkf Exp $
*/
#include "tclInt.h"
@@ -611,6 +611,13 @@ InfoBodyCmd(dummy, interp, objc, objv)
*/
bodyPtr = procPtr->bodyPtr;
+ if (bodyPtr->bytes == NULL) {
+ /*
+ * The string rep might not be valid if the procedure has
+ * never been run before. [Bug #545644]
+ */
+ (void) Tcl_GetString(bodyPtr);
+ }
resultPtr = Tcl_NewStringObj(bodyPtr->bytes, bodyPtr->length);
Tcl_SetObjResult(interp, resultPtr);