summaryrefslogtreecommitdiffstats
path: root/generic/tclCmdIL.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclCmdIL.c')
-rw-r--r--generic/tclCmdIL.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c
index dccfc10..18a4a72 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.135 2007/12/26 19:26:08 msofer Exp $
+ * RCS: @(#) $Id: tclCmdIL.c,v 1.136 2008/01/22 11:38:33 msofer Exp $
*/
#include "tclInt.h"
@@ -2609,6 +2609,15 @@ Tcl_LreverseObjCmd(
return TCL_ERROR;
}
+ /*
+ * If the list is empty, just return it [Bug 1876793]
+ */
+
+ if (!elemc) {
+ Tcl_SetObjResult(interp, objv[1]);
+ return TCL_OK;
+ }
+
if (Tcl_IsShared(objv[1])) {
Tcl_Obj *resultObj, **dataArray;
List *listPtr;