summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dransfeld <sd@tango.flipp.net>2012-11-22 22:18:34 +0000
committerSebastian Dransfeld <sd@tango.flipp.net>2012-11-22 22:18:34 +0000
commitc9663b24d60f0ca883d3f5e61dd8a3927e6a62e4 (patch)
tree7bb96a381f3b174663803a4190467b1648fec8c3
parent57f2e02b9e2f5c104ff3d856f42b6dcd19756d4d (diff)
efreet: elements aren't always double quoted
SVN revision: 79550
-rw-r--r--legacy/efreet/src/lib/efreet_base.c14
1 files 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);
21#endif 21#endif
22 22
23#include <unistd.h> 23#include <unistd.h>
24#include <ctype.h>
24 25
25#ifdef _WIN32 26#ifdef _WIN32
26# include <winsock2.h> 27# include <winsock2.h>
@@ -524,9 +525,16 @@ efreet_user_dir_get(const char *key, const char *fallback)
524 if (!eq) continue; 525 if (!eq) continue;
525 if (strncmp(key, line->start, eq - line->start)) continue; 526 if (strncmp(key, line->start, eq - line->start)) continue;
526 if (++eq >= line->end) continue; 527 if (++eq >= line->end) continue;
527 if (*eq != '"') continue; 528 if (*eq == '"')
528 if (++eq >= line->end) continue; 529 {
529 end = memchr(eq, '"', line->end - eq); 530 if (++eq >= line->end) continue;
531 end = memchr(eq, '"', line->end - eq);
532 }
533 else
534 {
535 end = line->end;
536 while (isspace(*end)) end--;
537 }
530 if (!end) continue; 538 if (!end) continue;
531 ret = alloca(end - eq + 1); 539 ret = alloca(end - eq + 1);
532 memcpy(ret, eq, end - eq); 540 memcpy(ret, eq, end - eq);