mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
nTox.c:
- correct a message who claims we're going to exit when we actually aren't - don't treat a failed close on reading the data file as failure of the reading
This commit is contained in:
parent
d017189bb6
commit
20f865521a
@ -496,7 +496,7 @@ int load_data(Tox *m)
|
|||||||
|
|
||||||
uint8_t data[size];
|
uint8_t data[size];
|
||||||
if (fread(data, sizeof(uint8_t), size, data_file) != size) {
|
if (fread(data, sizeof(uint8_t), size, data_file) != size) {
|
||||||
fputs("[!] could not read data file! exiting...\n", stderr);
|
fputs("[!] could not read data file!\n", stderr);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -504,7 +504,8 @@ int load_data(Tox *m)
|
|||||||
|
|
||||||
if (fclose(data_file) < 0) {
|
if (fclose(data_file) < 0) {
|
||||||
perror("[!] fclose failed");
|
perror("[!] fclose failed");
|
||||||
return 0;
|
/* we got it open and the expected data read... let it be ok */
|
||||||
|
/* return 0; */
|
||||||
}
|
}
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user