Open kervinpierre opened 4 years ago
parse_file() fseek()'s to the EOF to determine its size. But it then does a fread() on that file without rewinding the file pointer.
https://github.com/vinniefalco/BeastLounge/blob/develop/server/server.cpp#L115
The parse_file() function was introduced here: https://github.com/vinniefalco/BeastLounge/commit/0cc396faf911fb483c5bb5413a50c53b204550d5#diff-3985278eaa02e0ecb1c184941c13eeb3
This function fails for me Windows 10/VS2019.
Expected: A rewind after ftell, but before fread fseek(f, 0, SEEK_SET);
fseek(f, 0, SEEK_SET);
Should be fixed in the latest develop
parse_file() fseek()'s to the EOF to determine its size. But it then does a fread() on that file without rewinding the file pointer.
https://github.com/vinniefalco/BeastLounge/blob/develop/server/server.cpp#L115
The parse_file() function was introduced here: https://github.com/vinniefalco/BeastLounge/commit/0cc396faf911fb483c5bb5413a50c53b204550d5#diff-3985278eaa02e0ecb1c184941c13eeb3
This function fails for me Windows 10/VS2019.
Expected: A rewind after ftell, but before fread
fseek(f, 0, SEEK_SET);