From 9d32c01d675cb8e6a95a9492b1d9eb274653e1ca Mon Sep 17 00:00:00 2001 From: H.G.Muller Date: Fri, 11 Mar 2016 16:59:41 +0100 Subject: [PATCH] Fix recognition of .SS lines in manual The logic for recognizing .SS headers was reversed, and .SS lines were also not tested for to decide whether display should end. --- dialogs.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dialogs.c b/dialogs.c index eecf453..6ecdcaf 100644 --- a/dialogs.c +++ b/dialogs.c @@ -2467,8 +2467,8 @@ GetHelpText (FILE *f, char *name) while(buf[--len] == ' ') buf[len] = NULLCHAR; 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))) { - while((line = ReadLine(f)) && (cnt == 0 || strncmp(line, ".B ", 3))) { + if(!strncmp(line, buf, len) || !strncmp(line, ".SS ", 4) && !strncmp(line+4, buf+3, len-3)) { + while((line = ReadLine(f)) && (cnt == 0 || strncmp(line, ".B ", 3) && strncmp(line, ".SS ", 4))) { if(!*line) { *p++ = '\n'; *p++ = '\n'; q = p; continue; } if(*line == '.') continue; *p++ = ' '; cnt++; -- 1.7.0.4