diagnostics: don't crash when libtextstyle is installed

Reported by neok m4700.
https://lists.gnu.org/archive/html/bison-patches/2019-05/msg00025.html
https://github.com/akimd/bison/pull/11

* src/complain.c (complain_init_color): style_file_prepare _needs_ a
string as second argument.
This commit is contained in:
Akim Demaille
2019-05-19 18:16:47 +02:00
parent 1e49f5e1e6
commit c8e57e8159
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -118,6 +118,7 @@ Mike Sullivan [email protected]
Nate Guerin [email protected] Nate Guerin [email protected]
Neil Booth [email protected] Neil Booth [email protected]
Nelson H. F. Beebe [email protected] Nelson H. F. Beebe [email protected]
neok m4700 [email protected]
Nick Bowler [email protected] Nick Bowler [email protected]
Nicolas Bedon [email protected] Nicolas Bedon [email protected]
Nicolas Burrus [email protected] Nicolas Burrus [email protected]
+1 -1
View File
@@ -255,7 +255,7 @@ complain_init_color (void)
|| color_mode == color_html || color_mode == color_html
|| (color_mode == color_tty && isatty (STDERR_FILENO))) || (color_mode == color_tty && isatty (STDERR_FILENO)))
{ {
style_file_prepare ("BISON_STYLE", NULL, pkgdatadir (), style_file_prepare ("BISON_STYLE", "BISON_STYLEDIR", pkgdatadir (),
"bison-default.css"); "bison-default.css");
/* As a fallback, use the default in the current directory. */ /* As a fallback, use the default in the current directory. */
struct stat statbuf; struct stat statbuf;