mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-03 10:04:32 +03:00
* syntax.c (edit_read_syntax_file): Fix segmentation violation.
This commit is contained in:
parent
d25cf0011b
commit
6f35fce869
@ -1,3 +1,7 @@
|
||||
2003-03-06 Andrew V. Samoilov <sav@bcs.zp.ua>
|
||||
|
||||
* syntax.c (edit_read_syntax_file): Fix segmentation violation.
|
||||
|
||||
2003-03-03 Andrew V. Samoilov <sav@bcs.zp.ua>
|
||||
|
||||
* syntax.c (edit_read_syntax_rules): Check for list of defines
|
||||
|
@ -1005,7 +1005,9 @@ edit_read_syntax_file (WEdit * edit, char **names, const char *syntax_file,
|
||||
}
|
||||
if (q) {
|
||||
int line_error;
|
||||
char *syntax_type;
|
||||
found_type:
|
||||
syntax_type = args[2];
|
||||
line_error = edit_read_syntax_rules (edit, g ? g : f, args);
|
||||
if (line_error) {
|
||||
if (!error_file_name) /* an included file */
|
||||
@ -1014,7 +1016,7 @@ edit_read_syntax_file (WEdit * edit, char **names, const char *syntax_file,
|
||||
result = line_error;
|
||||
} else {
|
||||
syntax_g_free (edit->syntax_type);
|
||||
edit->syntax_type = g_strdup (args[2]);
|
||||
edit->syntax_type = g_strdup (syntax_type);
|
||||
/* if there are no rules then turn off syntax highlighting for speed */
|
||||
if (!g && !edit->rules[1])
|
||||
if (!edit->rules[0]->keyword[1] && !edit->rules[0]->spelling) {
|
||||
|
Loading…
Reference in New Issue
Block a user