Ticket #2859 (mcedit ctags fix)

How to reproduce:

    on sources: ctags -R .
    with tags in current dir open any file (needn't be C source or headers)
    Alt- (i.e. alt minus or Esc '-')

Current result: sigsegv

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
This commit is contained in:
Ilia Maslakov 2012-07-31 17:29:45 +04:00
parent 8f0ae5c2d5
commit da9eda40a9
3 changed files with 4 additions and 3 deletions

View File

@ -159,7 +159,7 @@ extern int enable_show_tabs_tws;
extern edit_search_options_t edit_search_options;
extern int edit_stack_iterator;
extern unsigned int edit_stack_iterator;
extern edit_stack_type edit_history_moveto[MAX_HISTORY_MOVETO];
extern int option_line_state_width;

View File

@ -101,7 +101,7 @@ int show_right_margin = 0;
const char *option_whole_chars_search = "0123456789abcdefghijklmnopqrstuvwxyz_";
char *option_backup_ext = NULL;
int edit_stack_iterator = 0;
unsigned int edit_stack_iterator = 0;
edit_stack_type edit_history_moveto[MAX_HISTORY_MOVETO];
/* magic sequense for say than block is vertical */
const char VERTICAL_MAGIC[] = { '\1', '\1', '\1', '\1', '\n' };

View File

@ -3404,7 +3404,8 @@ edit_load_back_cmd (WEdit * edit)
return TRUE;
}
if (edit_stack_iterator < 0)
/* we are in the bottom of the stack, NO WAY! */
if (edit_stack_iterator == 0)
return FALSE;
edit_stack_iterator--;