(edit_read_syntax_rules): fix pointer tests.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2014-10-01 09:31:12 +04:00
parent 4dd577fbe0
commit 172196d16a

View File

@ -8,7 +8,7 @@
Paul Sheer, 1998
Egmont Koblinger <egmont@gmail.com>, 2010
Slava Zanko <slavazanko@gmail.com>, 2013
Andrew Borodin <aborodin@vmail.ru>, 2013
Andrew Borodin <aborodin@vmail.ru>, 2013, 2014
This file is part of the Midnight Commander.
@ -1046,13 +1046,13 @@ edit_read_syntax_rules (WEdit * edit, FILE * f, char **args, int args_size)
c->keyword[0] = g_malloc0 (sizeof (struct key_word));
subst_defines (edit->defines, a, &args[1024]);
fg = *a;
if (*a != '\0')
if (*a != NULL)
a++;
bg = *a;
if (*a != '\0')
if (*a != NULL)
a++;
attrs = *a;
if (*a != '\0')
if (*a != NULL)
a++;
g_strlcpy (last_fg, fg != NULL ? fg : "", sizeof (last_fg));
g_strlcpy (last_bg, bg != NULL ? bg : "", sizeof (last_bg));
@ -1119,13 +1119,13 @@ edit_read_syntax_rules (WEdit * edit, FILE * f, char **args, int args_size)
k->first = *k->keyword;
subst_defines (edit->defines, a, &args[1024]);
fg = *a;
if (*a != '\0')
if (*a != NULL)
a++;
bg = *a;
if (*a != '\0')
if (*a != NULL)
a++;
attrs = *a;
if (*a != '\0')
if (*a != NULL)
a++;
if (fg == NULL)
fg = last_fg;