mirror of
https://github.com/thepigeongenerator/tetris_clone.git
synced 2025-12-17 05:55:46 +01:00
fix: inverting compat access returns; not the expected return value
This commit is contained in:
@@ -48,9 +48,9 @@ enum faccess_perms {
|
|||||||
returns 0 upon success. -1 when errno is set and anything else when one or more of the permissions isn't set */
|
returns 0 upon success. -1 when errno is set and anything else when one or more of the permissions isn't set */
|
||||||
static inline int faccess(char const* restrict fname, int perms) {
|
static inline int faccess(char const* restrict fname, int perms) {
|
||||||
#if defined __unix__ && _POSIX_C_SOURCE >= 200809L
|
#if defined __unix__ && _POSIX_C_SOURCE >= 200809L
|
||||||
return !access(fname, perms);
|
return access(fname, perms);
|
||||||
#elif defined _WIN32
|
#elif defined _WIN32
|
||||||
return !_access(fname, perms);
|
return _access(fname, perms);
|
||||||
#else
|
#else
|
||||||
# error platform unsupported!
|
# error platform unsupported!
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user