diff --git a/source/devoptab/devoptab_fsa_open.cpp b/source/devoptab/devoptab_fsa_open.cpp index 0d2c18d..c348587 100644 --- a/source/devoptab/devoptab_fsa_open.cpp +++ b/source/devoptab/devoptab_fsa_open.cpp @@ -48,7 +48,7 @@ int __fsa_open(struct _reent *r, } // Open the file - FSOpenFileFlags openFlags = (mode & O_UNENCRYPTED) ? FS_OPEN_FLAG_UNENCRYPTED : FS_OPEN_FLAG_NONE; + FSOpenFileFlags openFlags = (flags & O_UNENCRYPTED) ? FS_OPEN_FLAG_UNENCRYPTED : FS_OPEN_FLAG_NONE; auto *deviceData = (FSADeviceData *) r->deviceData;