* help.c (help_handle_key): Sanity check for broken help files.

From David Martin <dmartina@excite.com>
This commit is contained in:
Pavel Roskin 2002-09-05 06:51:46 +00:00
parent ed9d61551d
commit b248f6bb32
2 changed files with 12 additions and 4 deletions

View File

@ -1,3 +1,8 @@
2002-09-05 Pavel Roskin <proski@gnu.org>
* help.c (help_handle_key): Sanity check for broken help files.
From David Martin <dmartina@excite.com>
2002-09-03 Pavel Roskin <proski@gnu.org>
* global.h: Eliminate xgetch, update all dependencies.

View File

@ -690,10 +690,13 @@ static int help_handle_key (struct Dlg_head *h, int c)
while (*new_item && *new_item != CHAR_NODE_END)
new_item++;
if (*++new_item == '['){
while (*new_item != ']')
new_item++;
currentpoint = new_item + 2;
selected_item = NULL;
while (*++new_item) {
if (*new_item == ']' && *++newitem && *++newitem) {
currentpoint = new_item;
selected_item = NULL;
break;
}
}
}
break;