Skip to content

Commit

Permalink
Merge pull request #8916 from ibuclaw/dmd-cxx-segfault
Browse files Browse the repository at this point in the history
[dmd-cxx] Backport: Don't pass null pointer as format parameter to errorSupplemental
  • Loading branch information
ibuclaw committed Nov 4, 2018
2 parents 497a814 + 2b2ba9c commit 2001933
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 2001933

Please sign in to comment.