summaryrefslogtreecommitdiff
path: root/riscos/help.c
diff options
context:
space:
mode:
authorRichard Wilson <rjw@netsurf-browser.org>2004-07-25 20:45:16 +0000
committerRichard Wilson <rjw@netsurf-browser.org>2004-07-25 20:45:16 +0000
commitde4d15128561f38a45009fccbaac234882216ab3 (patch)
treecb83b484d5aadbecca479feaa576284f971971c2 /riscos/help.c
parentb02f6fa9a0608187cb85752be81bde90071e8b7e (diff)
downloadnetsurf-de4d15128561f38a45009fccbaac234882216ab3.tar.gz
netsurf-de4d15128561f38a45009fccbaac234882216ab3.tar.bz2
[project @ 2004-07-25 20:45:15 by rjw]
Support for MNGs and JNGs. Bug fix for help token regression. Minor GUI fixes. svn path=/import/netsurf/; revision=1144
Diffstat (limited to 'riscos/help.c')
-rw-r--r--riscos/help.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/riscos/help.c b/riscos/help.c
index d247f51b4..1ba514f95 100644
--- a/riscos/help.c
+++ b/riscos/help.c
@@ -213,15 +213,18 @@ static void ro_gui_interactive_help_broadcast(wimp_message *message, char *token
help_full_message_reply *reply;
char *base_token;
+ /* Start off with an empty reply
+ */
+ reply = (help_full_message_reply *)message;
+ reply->reply[0] = '\0';
+
/* Check if the message exists
*/
translated_token = messages_get(token);
if (translated_token == token) {
/* We must never provide default help for a 'g' suffix.
*/
- if (token[strlen(token) - 1] == 'g') {
- token[0] = '\0';
- } else {
+ if (token[strlen(token) - 1] != 'g') {
/* Find the key from the token.
*/
base_token = token;
@@ -237,15 +240,16 @@ static void ro_gui_interactive_help_broadcast(wimp_message *message, char *token
/* Check if the base key exists and use an empty string if not
*/
translated_token = messages_get(token);
- if (translated_token == token) token[0] = '\0';
}
}
+
/* Copy our message string
*/
- reply = (help_full_message_reply *)message;
- reply->reply[235] = 0;
- strncpy(reply->reply, translated_token, 235);
+ if (translated_token != token) {
+ reply->reply[235] = 0;
+ strncpy(reply->reply, translated_token, 235);
+ }
/* Broadcast the help reply
*/