Fix FileGetMode writable detection

This commit is contained in:
David PHAM-VAN 2017-03-14 12:41:11 -07:00
parent 9c596b70a6
commit ca0398ffc2

View File

@ -524,7 +524,7 @@ static HANDLE_OPS shmOps = {
static const char* FileGetMode(DWORD dwDesiredAccess, DWORD dwCreationDisposition, BOOL* create)
{
BOOL writeable = dwDesiredAccess & (GENERIC_WRITE | STANDARD_RIGHTS_WRITE | FILE_WRITE_DATA | FILE_APPEND_DATA);
BOOL writeable = (dwDesiredAccess & (GENERIC_WRITE | STANDARD_RIGHTS_WRITE | FILE_WRITE_DATA | FILE_APPEND_DATA)) != 0;
switch(dwCreationDisposition)
{