Fix mem size calculation once more

A terminating null byte should be moved too.
Fixes commit b4266a20f8.
This commit is contained in:
Mikhail Efremov
2018-12-11 20:23:53 +03:00
committed by Landry Breuil
parent 43e1e0db95
commit c6e33f3048

View File

@@ -172,7 +172,7 @@ pretty_cmdline (gchar *cmdline, gchar *comm)
gchar *p = g_strstr_len (text, (gssize)text_size, comm);
if (p != NULL)
{
memmove (text, p, (gsize)(text_size - (gsize)(p - text)));
memmove (text, p, (gsize)(text_size - (gsize)(p - text) + 1));
}
}
}