diff options
author | dgp <dgp@noemail.net> | 2011-03-06 04:36:19 (GMT) |
---|---|---|
committer | dgp <dgp@noemail.net> | 2011-03-06 04:36:19 (GMT) |
commit | f38105ebc76ced937d1eb8a7fc58db98650bbe8d (patch) | |
tree | 34c33d682ae1538da97b1c13d0917b47d8ddc6fc /generic/tclParse.c | |
parent | 6acf6d6c01ef3798c8a8d98448253b02ae352d30 (diff) | |
download | tcl-f38105ebc76ced937d1eb8a7fc58db98650bbe8d.zip tcl-f38105ebc76ced937d1eb8a7fc58db98650bbe8d.tar.gz tcl-f38105ebc76ced937d1eb8a7fc58db98650bbe8d.tar.bz2 |
* generic/tclParse.c (TclParseBackslash): Correct trunction checks in
* tests/parse.test: \x and \u substitutions. [Bug 3200987]
FossilOrigin-Name: 36a55ea880afb7974e0d66f8ed29850ed5b8aa73
Diffstat (limited to 'generic/tclParse.c')
-rw-r--r-- | generic/tclParse.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tclParse.c b/generic/tclParse.c index ec9dc09..a3f8433 100644 --- a/generic/tclParse.c +++ b/generic/tclParse.c @@ -616,7 +616,7 @@ TclParseBackslash(src, numBytes, readPtr, dst) 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". */ result = 'x'; @@ -626,7 +626,7 @@ TclParseBackslash(src, numBytes, readPtr, dst) } 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". */ result = 'u'; |