mirror of https://github.com/MidnightCommander/mc
* help.c (show): Fix segfault on unterminated help files.
From David Martin <dmartina@excite.com>
This commit is contained in:
parent
581cd941f9
commit
74c4b19546
|
@ -1,5 +1,8 @@
|
|||
2002-08-31 Pavel Roskin <proski@gnu.org>
|
||||
|
||||
* help.c (show): Fix segfault on unterminated help files.
|
||||
From David Martin <dmartina@excite.com>
|
||||
|
||||
* key.c (get_event): Reduce scope of select_set. Don't check
|
||||
mouse_enabled all the time, instead break out of the loop if it
|
||||
becomes 0.
|
||||
|
|
|
@ -367,7 +367,7 @@ static void show (Dlg_head *h, char *paint_start)
|
|||
if (selected_item < paint_start)
|
||||
selected_item = NULL;
|
||||
|
||||
for (p = paint_start; *p != CHAR_NODE_END && line < help_lines; p++){
|
||||
for (p = paint_start; *p && *p != CHAR_NODE_END && line < help_lines; p++) {
|
||||
c = (unsigned char)*p;
|
||||
switch (c){
|
||||
case CHAR_LINK_START:
|
||||
|
|
Loading…
Reference in New Issue