diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-03-24 13:02:45 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-03-24 13:02:45 (GMT) |
commit | 0f1fe8880dc481b214a344189a6a6904b59eede0 (patch) | |
tree | 912f2f1b3e56524018e9ba33f9666bb1ff7e1435 /generic/tclParse.c | |
parent | af74f1af12dc408e48402831f746b42cf365baf7 (diff) | |
download | tcl-0f1fe8880dc481b214a344189a6a6904b59eede0.zip tcl-0f1fe8880dc481b214a344189a6a6904b59eede0.tar.gz tcl-0f1fe8880dc481b214a344189a6a6904b59eede0.tar.bz2 |
Make all internal small buffer related to Tcl_UtfBackslash() length 4, not TCL_UTF_MAX: For TCL_UTF_MAX=6 it was overkill, for TCL_UTF_MAX=3 not enough.
Prove that this works by adding a Travis CI build configuration using TCL_UTF_MAX=3
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 2419026..164905a 100644 --- a/generic/tclParse.c +++ b/generic/tclParse.c @@ -791,7 +791,7 @@ TclParseBackslash( Tcl_UniChar unichar = 0; int result; int count; - char buf[TCL_UTF_MAX] = ""; + char buf[4] = ""; if (numBytes == 0) { if (readPtr != NULL) { @@ -2151,7 +2151,7 @@ TclSubstTokens( Tcl_Obj *appendObj = NULL; const char *append = NULL; int appendByteLength = 0; - char utfCharBytes[TCL_UTF_MAX] = ""; + char utfCharBytes[4] = ""; switch (tokenPtr->type) { case TCL_TOKEN_TEXT: |