(mcview_set_datasource_string): minor optimization.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2014-07-02 10:10:04 +04:00
parent c1c8b8cdd9
commit 2712c1aefc

View File

@ -464,8 +464,8 @@ void
mcview_set_datasource_string (mcview_t * view, const char *s)
{
view->datasource = DS_STRING;
view->ds_string_data = (byte *) g_strdup (s);
view->ds_string_len = strlen (s);
view->ds_string_data = (byte *) g_strndup (s, view->ds_string_len);
}
/* --------------------------------------------------------------------------------------------- */