Unidiff1 files changed, 3 insertions, 0 deletions
|
diff --git a/cgit.c b/cgit.c index 66dd140..5816f3d 100644 --- a/ cgit.c+++ b/ cgit.c |
|
@@ -174,12 +174,15 @@ void config_cb(const char *name, const char *value) |
174 | } else if (!strcmp(name, "include")) |
174 | } else if (!strcmp(name, "include")) |
175 | parse_configfile(value, config_cb); |
175 | parse_configfile(value, config_cb); |
176 | } |
176 | } |
177 | |
177 | |
178 | static void querystring_cb(const char *name, const char *value) |
178 | static void querystring_cb(const char *name, const char *value) |
179 | { |
179 | { |
| |
180 | if (!value) |
| |
181 | value = ""; |
| |
182 | |
180 | if (!strcmp(name,"r")) { |
183 | if (!strcmp(name,"r")) { |
181 | ctx.qry.repo = xstrdup(value); |
184 | ctx.qry.repo = xstrdup(value); |
182 | ctx.repo = cgit_get_repoinfo(value); |
185 | ctx.repo = cgit_get_repoinfo(value); |
183 | } else if (!strcmp(name, "p")) { |
186 | } else if (!strcmp(name, "p")) { |
184 | ctx.qry.page = xstrdup(value); |
187 | ctx.qry.page = xstrdup(value); |
185 | } else if (!strcmp(name, "url")) { |
188 | } else if (!strcmp(name, "url")) { |
|