lxde-overlay / lxde-base / lxpanel / files / lxpanel-menu.patch

diff -rud lxpanel-0.3.8-orig/src/plugins/menu.c lxpanel-0.3.8/src/plugins/menu.c
--- lxpanel-0.3.8-orig/src/plugins/menu.c	2008-07-02 18:50:42.000000000 -0300
+++ lxpanel-0.3.8/src/plugins/menu.c	2008-08-28 14:27:49.000000000 -0300
@@ -550,6 +550,7 @@
 static int
 menu_constructor(Plugin *p, char **fp)
 {
+    char *start;
     menup *m;
     static char default_config[] =
         "image=" PACKAGE_DATA_DIR "/lxpanel/images/my-computer.png\n"
@@ -591,7 +592,7 @@
     if( ! fp )
         fp = &config_default;
 
-    m->config_start = *fp;
+    m->config_start = start = *fp;
     if (!read_submenu(p, fp, FALSE)) {
         ERR("menu: plugin init failed\n");
         goto error;
@@ -603,8 +604,7 @@
     if( *m->config_end == '}' )
         --m->config_end;
 
-    m->config_data = g_strndup( m->config_start,
-                                (m->config_end-m->config_start) );
+    m->config_data = g_strndup( start, (m->config_end - start) );
 
     p->pwid = m->box;
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.