diff options
Diffstat (limited to 'unix/tkUnixSelect.c')
-rw-r--r-- | unix/tkUnixSelect.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/unix/tkUnixSelect.c b/unix/tkUnixSelect.c index 53275d1..4bb462e 100644 --- a/unix/tkUnixSelect.c +++ b/unix/tkUnixSelect.c @@ -21,7 +21,7 @@ typedef struct ConvertInfo { * offset of the next chunk of data to * transfer. */ Tcl_EncodingState state; /* The encoding state needed across chunks. */ - char buffer[4]; /* A buffer to hold part of a UTF character + char buffer[TCL_UTF_MAX]; /* A buffer to hold part of a UTF character * that is split across chunks.*/ } ConvertInfo; @@ -439,7 +439,7 @@ TkSelPropProc( * Preserve any left-over bytes. */ - if (srcLen > 4) { + if (srcLen > TCL_UTF_MAX) { Tcl_Panic("selection conversion left too many bytes unconverted"); } memcpy(incrPtr->converts[i].buffer, src, (size_t) srcLen+1); |