Skip to content

Instantly share code, notes, and snippets.

@ex
Created November 4, 2012 05:07
Bug bitwise operators precedence correction
#define FILE_ATTRIBUTE_DIRECTORY 0x00000010
bool GetPlatformFileInfo(PlatformFile file, PlatformFileInfo* info) {
...
info->is_directory =
(file_info.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) != 0;
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment