Skip to content

Commit 7bd3a92

Browse files
committed
Fix small bug
1 parent 79e76f1 commit 7bd3a92

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

src/system/if/dmod_if_file.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -186,9 +186,8 @@ DMOD_INPUT_WEAK_API_DECLARATION(Dmod, 1.0, size_t, _FileRead, ( void* Buffer, si
186186
#if DMOD_USE_STDIO
187187
read = fread(Buffer, Size, Count, resolvedFile);
188188
#endif
189-
189+
Dmod_UnlockStdio(File);
190190
}
191-
Dmod_UnlockStdio(File);
192191
return read;
193192
}
194193

@@ -219,9 +218,8 @@ DMOD_INPUT_WEAK_API_DECLARATION(Dmod, 1.0, size_t, _FileWrite, ( const void* Buf
219218
#if DMOD_USE_STDIO
220219
written = fwrite(Buffer, Size, Count, resolvedFile);
221220
#endif
222-
221+
Dmod_UnlockStdio(File);
223222
}
224-
Dmod_UnlockStdio(File);
225223
return written;
226224
}
227225

0 commit comments

Comments
 (0)