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:
parent
eb77c78dad
commit
438313d331
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user