diff options
author | dkf <dkf@noemail.net> | 2002-04-18 14:12:07 (GMT) |
---|---|---|
committer | dkf <dkf@noemail.net> | 2002-04-18 14:12:07 (GMT) |
commit | 437400e9bdeb47c4a2591bd7dc533315b46d60ec (patch) | |
tree | 79a8462334384e4c8831cc45887a5e04e182e0a0 /generic/tclCmdIL.c | |
parent | 932902ccb7776d56d2a245a51459c3542ee49ad5 (diff) | |
download | tcl-437400e9bdeb47c4a2591bd7dc533315b46d60ec.zip tcl-437400e9bdeb47c4a2591bd7dc533315b46d60ec.tar.gz tcl-437400e9bdeb47c4a2591bd7dc533315b46d60ec.tar.bz2 |
Fixed Bug #545644; [info body] always gives a proper string now!
FossilOrigin-Name: 7a7778468263e6840c16f00818509d1c4a4f8bb5
Diffstat (limited to 'generic/tclCmdIL.c')
-rw-r--r-- | generic/tclCmdIL.c | 9 |
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); |