From c31b5e030892e09c7f5bdc8538ecc09b760bab3b Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 1 Jun 2011 13:14:20 +0000 Subject: Revised fix for bug 3309871 --- generic/tclUtil.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generic/tclUtil.c b/generic/tclUtil.c index 9a23291..f5c2926 100644 --- a/generic/tclUtil.c +++ b/generic/tclUtil.c @@ -409,8 +409,8 @@ TclMaxListLength( do { bytes++; numBytes -= (numBytes != -1); - } while (numBytes && (*bytes != '\0') && TclIsSpaceProc(*bytes)); - if ((numBytes == 0) || (*bytes == '\0')) { + } while (numBytes && TclIsSpaceProc(*bytes)); + if ((numBytes == 0) || ((numBytes == -1) && (*bytes == '\0'))) { break; } /* (*bytes) is non-space; return to counting state */ -- cgit v0.12