diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2020-08-08 11:53:00 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2020-08-08 11:53:00 +0200 |
commit | b623f5953691b2a0614e6f1f4def86bdbb9a4113 (patch) | |
tree | 18102bd36f7e22eb2ba2b9f880e4cb29346f4cb8 /app/wlib/gtklib/ixhelp.c | |
parent | 359b557176b9bb2ff1aed2082641eed39c358d0d (diff) |
New upstream version 5.2.0Beta2.1upstream/5.2.0Beta2.1
Diffstat (limited to 'app/wlib/gtklib/ixhelp.c')
-rw-r--r-- | app/wlib/gtklib/ixhelp.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/app/wlib/gtklib/ixhelp.c b/app/wlib/gtklib/ixhelp.c index f1e3983..5079f61 100644 --- a/app/wlib/gtklib/ixhelp.c +++ b/app/wlib/gtklib/ixhelp.c @@ -404,6 +404,13 @@ void wHelp(const char * topic) { char *htmlFile; + //Take off any topic characters after a '-' + + if (!topic || !topic[0]) return; + + + if (!CheckHelpTopicExists(topic)) return; + if (!wHelpWindow) { directory = malloc(BUFSIZ); assert(directory != NULL); @@ -417,6 +424,7 @@ void wHelp(const char * topic) /* need space for the 'html' extension plus dot plus \0 */ htmlFile = malloc(strlen(topic) + 6); + assert(htmlFile != NULL); sprintf(htmlFile, "%s.html", topic); @@ -424,4 +432,6 @@ void wHelp(const char * topic) load_into_view(htmlFile, MAIN_VIEW); gtk_widget_show_all(wHelpWindow); gtk_window_present(GTK_WINDOW(wHelpWindow)); + + free(htmlFile); } |