Source

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;