mirror of
https://github.com/weechat/weechat.git
synced 2026-06-12 14:14:48 +02:00
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]".
This commit is contained in:
+1
-1
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user