diff options
Diffstat (limited to 'generic/tclIO.c')
| -rw-r--r-- | generic/tclIO.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/generic/tclIO.c b/generic/tclIO.c index 9662421..36b3fad 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -4712,14 +4712,14 @@ Tcl_GetsObj( * Skip the raw bytes that make up the '\n'. */ - char tmp[4]; + char tmp[TCL_UTF_MAX]; int rawRead; bufPtr = gs.bufPtr; Tcl_ExternalToUtf(NULL, gs.encoding, RemovePoint(bufPtr), gs.rawRead, statePtr->inputEncodingFlags | TCL_ENCODING_NO_TERMINATE, &gs.state, tmp, - 4, &rawRead, NULL, NULL); + TCL_UTF_MAX, &rawRead, NULL, NULL); bufPtr->nextRemoved += rawRead; gs.rawRead -= rawRead; gs.bytesWrote--; @@ -6265,8 +6265,8 @@ ReadChars( */ if (code != TCL_OK) { - char buffer[5]; int read, decoded, count; + char buffer[TCL_UTF_MAX + 1]; /* * Didn't get everything the buffer could offer |
