summaryrefslogtreecommitdiff
path: root/src/xselect.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/xselect.c')
-rw-r--r--src/xselect.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/xselect.c b/src/xselect.c
index 3de9748b7b5..2ba3d869019 100644
--- a/src/xselect.c
+++ b/src/xselect.c
@@ -1582,13 +1582,13 @@ lisp_data_to_selection_data (display, obj,
{
/* Since we are now handling multilingual text, we must consider
sending back compound text. */
- char charsets[MAX_CHARSET];
+ char charsets[MAX_CHARSET + 1];
int num;
*format_ret = 8;
*size_ret = XSTRING (obj)->size;
*data_ret = XSTRING (obj)->data;
- bzero (charsets, MAX_CHARSET);
+ bzero (charsets, MAX_CHARSET + 1);
num = ((*size_ret <= 1) /* Check the possibility of short cut. */
? 0
: find_charset_in_str (*data_ret, *size_ret, charsets));