mirror of
https://github.com/Tha14/toxic.git
synced 2024-11-26 13:53:26 +01:00
Fixed "fread() failed" bug on windows.
This commit is contained in:
parent
04a44b7cdb
commit
92ff51f335
@ -298,7 +298,7 @@ static void load_data(Tox *m, char *path)
|
|||||||
size_t len;
|
size_t len;
|
||||||
uint8_t *buf;
|
uint8_t *buf;
|
||||||
|
|
||||||
if ((fd = fopen(path, "r")) != NULL) {
|
if ((fd = fopen(path, "rb")) != NULL) {
|
||||||
fseek(fd, 0, SEEK_END);
|
fseek(fd, 0, SEEK_END);
|
||||||
len = ftell(fd);
|
len = ftell(fd);
|
||||||
fseek(fd, 0, SEEK_SET);
|
fseek(fd, 0, SEEK_SET);
|
||||||
|
Loading…
Reference in New Issue
Block a user