diff options
author | Marco Peereboom <marco@conformal.com> | 2011-01-12 02:56:37 +0000 |
---|---|---|
committer | Marco Peereboom <marco@conformal.com> | 2011-01-12 02:56:37 +0000 |
commit | ac3b52d10bb2829d8996c842eed79177cdd33d10 (patch) | |
tree | 8451befdc0b676dcf24a806f094101a299c8ec90 /xxxterm.c | |
parent | c113b28e56b988a9e0e3fd8f94d69a0862b60bee (diff) | |
download | xombrero-ac3b52d10bb2829d8996c842eed79177cdd33d10.tar.gz |
fix longstanding bug where one couldn't open files that contained spaces
Diffstat (limited to 'xxxterm.c')
-rw-r--r-- | xxxterm.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/xxxterm.c b/xxxterm.c index a419b94..9cbc1e0 100644 --- a/xxxterm.c +++ b/xxxterm.c @@ -903,14 +903,15 @@ match_alias(char *url_in) { struct alias *a; char *arg; - char *url_out = NULL; + char *url_out = NULL, *search; - arg = url_in; + search = g_strdup(url_in); + arg = search; if (strsep(&arg, " \t") == NULL) errx(1, "match_alias: NULL URL"); TAILQ_FOREACH(a, &aliases, entry) { - if (!strcmp(url_in, a->a_name)) + if (!strcmp(search, a->a_name)) break; } @@ -923,6 +924,8 @@ match_alias(char *url_in) url_out = g_strdup(a->a_uri); } + g_free(search); + return (url_out); } |