summaryrefslogtreecommitdiffstats
path: root/generic/tclUtil.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclUtil.c')
-rw-r--r--generic/tclUtil.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/generic/tclUtil.c b/generic/tclUtil.c
index 6f36dad..55103e3 100644
--- a/generic/tclUtil.c
+++ b/generic/tclUtil.c
@@ -1261,7 +1261,9 @@ int TclConvertElement(
p[1] = '#';
p += 2;
src++;
- length--;
+ if (length > 0) {
+ length--;
+ }
} else {
conversion = CONVERT_BRACE;
}