this new patch fixes the typos in the comments...
Index: wmaker-0.95.8/util/wmmenugen_parse_xdg.c
===================================================================
--- wmaker-0.95.8.orig/util/wmmenugen_parse_xdg.c
+++ wmaker-0.95.8/util/wmmenugen_parse_xdg.c
@@ -297,7 +297,7 @@ static void getKey(char **target, const
static void getStringValue(char **target, const char *line)
{
const char *p;
- int kstart;
+ int kstart, kend;
p = line;
kstart = 0;
@@ -311,7 +311,15 @@ static void getStringValue(char **target
while (*(p + kstart) && isspace(*(p + kstart)))
kstart++;
- *target = wstrdup(p + kstart);
+ /* skip up until first % */
+ kend = kstart + 1;
+ while (*(p + kend) && *(p + kend) != '%')
+ kend++;
+
+ /* remove trailing whitespace if any */
+ if(isspace(*(p + kend -1))) kend--;
+
+ *target = wstrndup(p + kstart, kend - kstart);
}
/* get a localized string value from line. allocates target, which must be wfreed later.