summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--generic/tclUtil.c4
1 files 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 */