From 5418debea5287aa2e9c49d99c26e6e1f40788dd4 Mon Sep 17 00:00:00 2001 From: John Darrington Date: Sun, 15 Aug 2010 10:58:32 +0200 Subject: [PATCH] Fix bug reallocating sourceview path array --- src/ui/gui/psppire-syntax-window.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ui/gui/psppire-syntax-window.c b/src/ui/gui/psppire-syntax-window.c index 436830c3..68c1546e 100644 --- a/src/ui/gui/psppire-syntax-window.c +++ b/src/ui/gui/psppire-syntax-window.c @@ -114,7 +114,7 @@ psppire_syntax_window_class_init (PsppireSyntaxWindowClass *class) gchar **new_paths = g_strdupv ((gchar **)existing_paths); int n = g_strv_length ((gchar **) existing_paths); - new_paths = g_realloc (new_paths, (n + 1) * sizeof (*new_paths)); + new_paths = g_realloc (new_paths, (n + 2) * sizeof (*new_paths)); new_paths[n] = g_strdup (relocate (PKGDATADIR)); new_paths[n+1] = NULL; -- 2.30.2