Add extra element for NULL at the end

Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
This commit is contained in:
Sebastian Ramacher 2014-01-19 17:15:09 +01:00
parent 71ef7c7eed
commit 3524c6da23

View file

@ -64,7 +64,7 @@ synctex_edit(zathura_t* zathura, zathura_page_t* page, int x, int y)
} }
char** argv = g_try_malloc0(sizeof(char*) * (zathura->synctex.editor != NULL ? char** argv = g_try_malloc0(sizeof(char*) * (zathura->synctex.editor != NULL ?
6 : 4)); 7 : 5));
if (argv == NULL) { if (argv == NULL) {
return; return;
} }
@ -105,7 +105,7 @@ synctex_rectangles_from_position(const char* filename, const char* position,
return NULL; return NULL;
} }
char** argv = g_try_malloc0(sizeof(char*) * 6); char** argv = g_try_malloc0(sizeof(char*) * 7);
if (argv == NULL) { if (argv == NULL) {
return NULL; return NULL;
} }