Skip to content

Commit

Permalink
Merge pull request #9142 from BBasile/null-terminated-bugs-fiesta
Browse files Browse the repository at this point in the history
fix issue 19510 - random and spurious error about a missing NOLOGO.d file
merged-on-behalf-of: Mathias LANG <pro.mathias.lang@gmail.com>
  • Loading branch information
dlang-bot authored Dec 25, 2018
2 parents 2fcd946 + e22d631 commit 9f5527f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/dmd/link.d
Original file line number Diff line number Diff line change
Expand Up @@ -1052,9 +1052,10 @@ version (Windows)

// try lld-link.exe alongside dmd.exe
char[MAX_PATH + 1] dmdpath = void;
if (GetModuleFileNameA(null, dmdpath.ptr, dmdpath.length) <= MAX_PATH)
const len = GetModuleFileNameA(null, dmdpath.ptr, dmdpath.length);
if (len <= MAX_PATH)
{
auto lldpath = FileName.replaceName(dmdpath, "lld-link.exe");
auto lldpath = FileName.replaceName(dmdpath[0 .. len], "lld-link.exe");
if (FileName.exists(lldpath))
return lldpath.ptr;
}
Expand Down

0 comments on commit 9f5527f

Please sign in to comment.