summaryrefslogtreecommitdiffstats
path: root/cgi.c
diff options
context:
space:
mode:
Diffstat (limited to 'cgi.c')
-rw-r--r--cgi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/cgi.c b/cgi.c
index c3793f2e..c816852c 100644
--- a/cgi.c
+++ b/cgi.c
@@ -874,8 +874,9 @@ format(const struct req *req, const char *file)
}
snprintf(opts, sizeof(opts), "fragment,man=%s?"
- "manpath=%s&query=%%N&sec=%%S&arch=%s",
+ "manpath=%s&query=%%N&sec=%%S%s%s",
scriptname, req->q.manpath,
+ req->q.arch ? "&arch=" : "",
req->q.arch ? req->q.arch : "");
mparse_result(mp, &mdoc, &man, NULL);