Skip to content

Commit

Permalink
[dmd-cxx] Backport: Don't pass null pointer as format parameter to er…
Browse files Browse the repository at this point in the history
…rorSupplemental
  • Loading branch information
ibuclaw committed Nov 4, 2018
1 parent 497a814 commit 2b2ba9c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/dmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,8 @@ bool Module::read(Loc loc)
{
::error(loc, "cannot find source code for runtime library file 'object.d'");
errorSupplemental(loc, "dmd might not be correctly installed. Run 'dmd -man' for installation instructions.");
errorSupplemental(loc, "config file: %s", FileName::canonicalName(global.inifilename));
const char *dmdConfFile = FileName::canonicalName(global.inifilename);
errorSupplemental(loc, "config file: %s", dmdConfFile ? dmdConfFile : "not found");
}
else
{
Expand Down

0 comments on commit 2b2ba9c

Please sign in to comment.