From f275a7d75401fe7aca194722e9d20c7e58ec9169 Mon Sep 17 00:00:00 2001 From: dkf Date: Sat, 27 Sep 2008 19:34:59 +0000 Subject: Corrected sanity test in zero-element case --- generic/tclCmdIL.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c index 73144f8..af3c3bb 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.154 2008/09/27 14:16:42 dkf Exp $ + * RCS: @(#) $Id: tclCmdIL.c,v 1.155 2008/09/27 19:34:59 dkf Exp $ */ #include "tclInt.h" @@ -2479,7 +2479,8 @@ Tcl_LrepeatObjCmd( */ totalElems = objc * elementCount; - if (totalElems/objc != elementCount || totalElems/elementCount != objc) { + if (totalElems != 0 && (totalElems/objc != elementCount + || totalElems/elementCount != objc)) { Tcl_AppendResult(interp, "too many elements in result list", NULL); return TCL_ERROR; } -- cgit v0.12