[gnome-builder/wip/gtk4-port: 271/1774] libide/gui: fix path generation for settings
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/gtk4-port: 271/1774] libide/gui: fix path generation for settings
- Date: Mon, 11 Jul 2022 22:31:05 +0000 (UTC)
commit 170a23ed7cde8d62b34a8e0b23743599c93a9922
Author: Christian Hergert <chergert redhat com>
Date: Thu Mar 31 04:20:38 2022 -0700
libide/gui: fix path generation for settings
src/libide/gui/ide-preferences-window.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/src/libide/gui/ide-preferences-window.c b/src/libide/gui/ide-preferences-window.c
index 9f17ef724..73d654879 100644
--- a/src/libide/gui/ide-preferences-window.c
+++ b/src/libide/gui/ide-preferences-window.c
@@ -142,10 +142,13 @@ ide_preferences_window_get_settings (IdePreferencesWindow *self,
guint j = strlen (entry->path) - 1;
char c;
- path = g_malloc0 (strlen (entry->path) + strlen (subkey) + 1);
+ subkey++;
+
+ path = g_malloc0 (strlen (entry->path) + strlen (subkey) + 2);
memcpy (path, entry->path, j);
while ((c = *(subkey++)))
path[j++] = c;
+ path[j++] = '/';
path[j] = 0;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]