diff options
Diffstat (limited to 'lib/System/Win32')
-rw-r--r-- | lib/System/Win32/Program.inc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/System/Win32/Program.inc b/lib/System/Win32/Program.inc index cb002132bf..52eb9677ff 100644 --- a/lib/System/Win32/Program.inc +++ b/lib/System/Win32/Program.inc @@ -77,10 +77,12 @@ static HANDLE RedirectIO(const Path *path, int fd, std::string* ErrMsg) { 0, TRUE, DUPLICATE_SAME_ACCESS); return h; } - - const char *fname = path->toString().c_str(); - if (*fname == 0) + + const char *fname; + if (path->isEmpty()) fname = "NUL"; + else + fname = path->toString().c_str(); SECURITY_ATTRIBUTES sa; sa.nLength = sizeof(sa); |