Commit 14992129 authored by Michael Catanzaro's avatar Michael Catanzaro

Silence -Wstring-op-truncation warning

It's a false positive, because we add the NUL on the next line, but
better to just fix the strncpy.
parent e498ee96
......@@ -119,8 +119,7 @@ ephy_string_shorten (char *str,
new_str = g_new (gchar, bytes + strlen (ELLIPSIS) + 1);
strncpy (new_str, str, bytes);
strncpy (new_str + bytes, ELLIPSIS, strlen (ELLIPSIS));
new_str[bytes + strlen (ELLIPSIS)] = '\0';
strncpy (new_str + bytes, ELLIPSIS, strlen (ELLIPSIS) + 1);
g_free (str);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment