diff options
| author | donal.k.fellows@manchester.ac.uk <dkf> | 2002-04-18 14:12:07 (GMT) |
|---|---|---|
| committer | donal.k.fellows@manchester.ac.uk <dkf> | 2002-04-18 14:12:07 (GMT) |
| commit | fb11ccd40711152228f970306d1241bc98dc3ad0 (patch) | |
| tree | 79a8462334384e4c8831cc45887a5e04e182e0a0 /generic/tclCmdIL.c | |
| parent | 250d3797cf96f88f13a5f8cc918bad354cbf0e82 (diff) | |
| download | tcl-fb11ccd40711152228f970306d1241bc98dc3ad0.zip tcl-fb11ccd40711152228f970306d1241bc98dc3ad0.tar.gz tcl-fb11ccd40711152228f970306d1241bc98dc3ad0.tar.bz2 | |
Fixed Bug #545644; [info body] always gives a proper string now!
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); |
