summaryrefslogtreecommitdiffstats
path: root/generic/tclParse.c
diff options
context:
space:
mode:
authordgp <dgp@noemail.net>2011-03-06 05:11:04 (GMT)
committerdgp <dgp@noemail.net>2011-03-06 05:11:04 (GMT)
commit47333942db05a3b6916d71c7954fde5bf7064c73 (patch)
tree2496999b62eb2c82841c5e3260c80f210e5bc3c8 /generic/tclParse.c
parent5cc13f99f7400d7515eda09d8539882b5cdd9e22 (diff)
parente5e602cab75d9982dd72d9dc1bf702701a721836 (diff)
downloadtcl-47333942db05a3b6916d71c7954fde5bf7064c73.zip
tcl-47333942db05a3b6916d71c7954fde5bf7064c73.tar.gz
tcl-47333942db05a3b6916d71c7954fde5bf7064c73.tar.bz2
* generic/tclParse.c (TclParseBackslash): Correct trunction checks in
* tests/parse.test: \x and \u substitutions. [Bug 3200987] FossilOrigin-Name: ffce86baaf814506290c66aec3c23ceb28aa59f4
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 48b1b88..149644d 100644
--- a/generic/tclParse.c
+++ b/generic/tclParse.c
@@ -852,7 +852,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".
@@ -867,7 +867,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".