Commit a9d45bba authored by David Lawrence Ramsey's avatar David Lawrence Ramsey
Browse files

in parse_colors(), properly generate an error if we get a color

directive without a regex string


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2620 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
No related merge requests found
Showing with 8 additions and 0 deletions
+8 -0
......@@ -140,6 +140,8 @@ CVS code -
parse_colors()
- Properly parse a background color without a foreground color.
(DLR)
- Properly generate an error if we get a color directive without
a regex string. (DLR)
- search.c:
do_gotoline()
- Properly show an error message if we try to go to line 0,
......
......@@ -402,6 +402,12 @@ void parse_colors(char *ptr)
return;
}
if (*ptr == '\0') {
rcfile_error(
N_("Cannot add a color directive without a regex string"));
return;
}
/* Now for the fun part. Start adding regexes to individual strings
* in the colorstrings array, woo! */
while (ptr != NULL && *ptr != '\0') {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment