summaryrefslogtreecommitdiffstats
path: root/generic/tclParse.c
diff options
context:
space:
mode:
authordgp <dgp@noemail.net>2011-03-06 04:49:16 (GMT)
committerdgp <dgp@noemail.net>2011-03-06 04:49:16 (GMT)
commite5e602cab75d9982dd72d9dc1bf702701a721836 (patch)
tree2a13ba6550e1211925ea9ff051ff6c94599a67a1 /generic/tclParse.c
parentd52cd67f6675a2c781913cb5fce2335b3a98babd (diff)
parentf38105ebc76ced937d1eb8a7fc58db98650bbe8d (diff)
downloadtcl-e5e602cab75d9982dd72d9dc1bf702701a721836.zip
tcl-e5e602cab75d9982dd72d9dc1bf702701a721836.tar.gz
tcl-e5e602cab75d9982dd72d9dc1bf702701a721836.tar.bz2
* generic/tclParse.c (TclParseBackslash): Correct trunction checks in
* tests/parse.test: \x and \u substitutions. [Bug 3200987] FossilOrigin-Name: c65512452c3d72b4ebf661f5adbbb48566976cc4
Diffstat (limited to 'generic/tclParse.c')
-rw-r--r--generic/tclParse.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tclParse.c b/generic/tclParse.c
index 42b8a20..963fad6 100644
--- a/generic/tclParse.c
+++ b/generic/tclParse.c
@@ -851,7 +851,7 @@ TclParseBackslash(
result = 0xb;
break;
case 'x':
- count += TclParseHex(p+1, numBytes-1, &result);
+ count += TclParseHex(p+1, numBytes-2, &result);
if (count == 2) {
/*
* No hexadigits -> This is just "x".
@@ -866,7 +866,7 @@ TclParseBackslash(
}
break;
case 'u':
- count += TclParseHex(p+1, (numBytes > 5) ? 4 : numBytes-1, &result);
+ count += TclParseHex(p+1, (numBytes > 5) ? 4 : numBytes-2, &result);
if (count == 2) {
/*
* No hexadigits -> This is just "u".