diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-07-10 07:26:55 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-07-10 07:26:55 (GMT) |
commit | 0fab7463a3318c4fb204e1d463c34ca2616bf201 (patch) | |
tree | 00d2093e38b942a3c50b3a70814328081a155445 /generic | |
parent | 1dfea026b838bf256caed3e3266f5d310f289a35 (diff) | |
download | tcl-0fab7463a3318c4fb204e1d463c34ca2616bf201.zip tcl-0fab7463a3318c4fb204e1d463c34ca2616bf201.tar.gz tcl-0fab7463a3318c4fb204e1d463c34ca2616bf201.tar.bz2 |
Addendum to [60fab362ce]: "Also don't allow surrogates in \U??????". This change was only meant for builds with TCL_UTF_MAX > 3.
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclParse.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/generic/tclParse.c b/generic/tclParse.c index 78f3a9e..7a51dae 100644 --- a/generic/tclParse.c +++ b/generic/tclParse.c @@ -942,9 +942,11 @@ TclParseBackslash( * No hexdigits -> This is just "U". */ result = 'U'; +#if TCL_UTF_MAX > 3 } else if ((result & ~0x7FF) == 0xD800) { /* Upper or lower surrogate, not allowed in this syntax. */ result = 0xFFFD; +#endif } break; case '\n': |