Skip to content

Fix dead nob_get_file_type error checks#263

Open
NeikiDev wants to merge 1 commit into
tsoding:mainfrom
NeikiDev:fix-file-type-guard
Open

Fix dead nob_get_file_type error checks#263
NeikiDev wants to merge 1 commit into
tsoding:mainfrom
NeikiDev:fix-file-type-guard

Conversation

@NeikiDev

Copy link
Copy Markdown

Fix for #262. The two if (type < 0) checks compare an unsigned enum, so they never fire. Changed them to compare against (Nob_File_Type)-1 directly. Also added a test covering these error paths.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant