From 39298ae34f47966df637ad5044250a7a2a15e46a Mon Sep 17 00:00:00 2001 From: H.G.Muller Date: Mon, 4 Apr 2016 12:04:36 +0200 Subject: [PATCH] Fix help clicks in Engine Settings dialogs A previous patch had broken recognition of the .IX Item "..." lines. --- dialogs.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dialogs.c b/dialogs.c index 1e3cc1a..306bc97 100644 --- a/dialogs.c +++ b/dialogs.c @@ -2606,10 +2606,10 @@ GetHelpText (FILE *f, char *name) len = strlen(buf); for(len=3; buf[len] && buf[len] != '(' && buf[len] != ':' && buf[len] != '.' && buf[len] != '?' && buf[len] != '\n'; len++); buf[len] = NULLCHAR; - while(buf[--len] == ' ') buf[len] = NULLCHAR; + while(buf[--len] == ' ') buf[len] = NULLCHAR; len++; snprintf(title, MSG_SIZ, "Help on '%s'", buf+3); while((line = ReadLine(f))) { - if(!strncmp(line, buf, ++len) || !strncmp(line, ".SS ", 4) && !strncmp(line+4, buf+3, len-3) + if(!strncmp(line, buf, len) || !strncmp(line, ".SS ", 4) && !strncmp(line+4, buf+3, len-3) || !strncmp(line, ".IX Item \"", 10) && !strncmp(line+10, buf+3, len-3)) { while((line = ReadLine(f)) && (cnt == 0 || strncmp(line, ".B ", 3) && strncmp(line, ".SS ", 4) && strncmp(line, ".IX ", 4))) { if(!*line) { *p++ = '\n'; *p++ = '\n'; q = p; continue; } @@ -2639,7 +2639,7 @@ GetHelpText (FILE *f, char *name) return; } } - snprintf(text, MSG_SIZ, "No help on '%s'\n", buf+3); + snprintf(text, MSG_SIZ, "No help available on '%s'\n", buf+3); DisplayNote(text); } -- 1.7.0.4