Skip to content

Commit

Permalink
Allow FASTSEEK to be enabled (#8)
Browse files Browse the repository at this point in the history
O_RDONLY = 0 in libnds, so the FASTSEEK feature was never enabled
  • Loading branch information
ds-sloth authored Jan 23, 2023
1 parent 4d1b958 commit 1a144ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libslim/source/elm.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ int _ELM_open_r(struct _reent *r, void *fileStruct, const char *path, int flags,
elm_error = f_open(fp, p, ff_flags);

#if FF_USE_FASTSEEK
if ((flags & O_RDONLY) && elm_error == FR_OK) // Enable fast seek if read only
if (((flags & O_RDONLY) || (flags == O_RDONLY)) && elm_error == FR_OK) // Enable fast seek if read only
{
FSIZE_t ptr = f_tell(fp);

Expand Down

0 comments on commit 1a144ff

Please sign in to comment.