diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2007-12-05 13:42:07 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2007-12-05 13:42:07 (GMT) |
commit | aaa7b42489be7695c3d8bf9f541a012c5b498b55 (patch) | |
tree | ebb78b76786de374fb7dada3ece1aedc49e9b3b4 /generic | |
parent | aeed90eee383e8502f8b85b78a1b6f0758d003c4 (diff) | |
download | tcl-aaa7b42489be7695c3d8bf9f541a012c5b498b55.zip tcl-aaa7b42489be7695c3d8bf9f541a012c5b498b55.tar.gz tcl-aaa7b42489be7695c3d8bf9f541a012c5b498b55.tar.bz2 |
Prevent shimmering crash in [lsearch] when -exact and -integer/-real are mixed.
[Bug 1844789]
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclCmdIL.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c index 8d05eba..60ebf29 100644 --- a/generic/tclCmdIL.c +++ b/generic/tclCmdIL.c @@ -16,7 +16,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.127 2007/11/21 14:30:31 dkf Exp $ + * RCS: @(#) $Id: tclCmdIL.c,v 1.128 2007/12/05 13:42:09 dkf Exp $ */ #include "tclInt.h" @@ -2993,6 +2993,13 @@ Tcl_LsearchObjCmd( } return result; } + + /* + * List representation might have been shimmered; restore it. [Bug + * 1844789] + */ + + TclListObjGetElements(NULL, objv[objc - 2], &listc, &listv); break; case REAL: result = Tcl_GetDoubleFromObj(interp, patObj, &patDouble); @@ -3002,6 +3009,13 @@ Tcl_LsearchObjCmd( } return result; } + + /* + * List representation might have been shimmered; restore it. [Bug + * 1844789] + */ + + TclListObjGetElements(NULL, objv[objc - 2], &listc, &listv); break; } } else { |