[gnome-builder/wip/gtk4-port: 257/343] 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: 257/343] libide/gui: fix path generation for settings
- Date: Mon, 4 Apr 2022 20:02:16 +0000 (UTC)
commit 1fd09ff8375fc120a7bb3d948777d411d3fd9b66
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]