From c9663b24d60f0ca883d3f5e61dd8a3927e6a62e4 Mon Sep 17 00:00:00 2001 From: Sebastian Dransfeld Date: Thu, 22 Nov 2012 22:18:34 +0000 Subject: [PATCH] efreet: elements aren't always double quoted SVN revision: 79550 --- legacy/efreet/src/lib/efreet_base.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/legacy/efreet/src/lib/efreet_base.c b/legacy/efreet/src/lib/efreet_base.c index d996a6b738..a4df1480ac 100644 --- a/legacy/efreet/src/lib/efreet_base.c +++ b/legacy/efreet/src/lib/efreet_base.c @@ -21,6 +21,7 @@ void *alloca (size_t); #endif #include +#include #ifdef _WIN32 # include @@ -524,9 +525,16 @@ efreet_user_dir_get(const char *key, const char *fallback) if (!eq) continue; if (strncmp(key, line->start, eq - line->start)) continue; if (++eq >= line->end) continue; - if (*eq != '"') continue; - if (++eq >= line->end) continue; - end = memchr(eq, '"', line->end - eq); + if (*eq == '"') + { + if (++eq >= line->end) continue; + end = memchr(eq, '"', line->end - eq); + } + else + { + end = line->end; + while (isspace(*end)) end--; + } if (!end) continue; ret = alloca(end - eq + 1); memcpy(ret, eq, end - eq);