Merge pull request #9114 from barbudreadmon/patch-4

fix return value of rfread when elem_size isn't 1
This commit is contained in:
Twinaphex 2019-07-15 14:32:16 +02:00 committed by GitHub
commit 2a89ca332f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -99,7 +99,7 @@ int64_t rfseek(RFILE* stream, int64_t offset, int origin)
int64_t rfread(void* buffer,
size_t elem_size, size_t elem_count, RFILE* stream)
{
return filestream_read(stream, buffer, elem_size * elem_count);
return (filestream_read(stream, buffer, elem_size * elem_count) / elem_size);
}
char *rfgets(char *buffer, int maxCount, RFILE* stream)