Skip to content

Commit

Permalink
fileSize() return value misused
Browse files Browse the repository at this point in the history
  • Loading branch information
WalterBright authored and dlang-bot committed Apr 5, 2024
1 parent eb6f23f commit d5764b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/src/dmd/common/file.d
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ else version (Windows)
private ulong fileSize(HANDLE fd)
{
ulong result;
if (GetFileSizeEx(fd, cast(LARGE_INTEGER*) &result) == 0)
if (GetFileSizeEx(fd, cast(LARGE_INTEGER*) &result))
return result;
return ulong.max;
}
Expand Down

0 comments on commit d5764b0

Please sign in to comment.