summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2018-10-21 08:54:04 +0200
committerSébastien Helleu <flashcode@flashtux.org>2018-10-21 08:54:04 +0200
commit438313d331bea9df3d8df777d754835478d7debc (patch)
tree7325afa01285cf79a31e3eef2187550dc377df47 /src/gui
parenteb77c78dad5d036ba436134a7f5744255cf23f2a (diff)
downloadweechat-438313d331bea9df3d8df777d754835478d7debc.zip
core: replace call to strncpy by memcpy
This fixes a gcc warning: "warning: ‘strncpy’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation]".
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/gui-input.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/gui-input.c b/src/gui/gui-input.c
index 47c8fad04..ec62906cc 100644
--- a/src/gui/gui-input.c
+++ b/src/gui/gui-input.c
@@ -274,7 +274,7 @@ gui_input_insert_string (struct t_gui_buffer *buffer, const char *string,
/* insert new string */
ptr_start = (char *)utf8_add_offset (buffer->input_buffer, pos);
- strncpy (ptr_start, string_utf8, size);
+ memcpy (ptr_start, string_utf8, size);
buffer->input_buffer_pos += length;
}