1
0
mirror of https://github.com/Tha14/toxic.git synced 2024-06-26 20:47:45 +02:00

Fix small nodeslist parsing bug

This commit is contained in:
Jfreegman 2016-10-23 12:26:18 -04:00
parent 4df44a7274
commit f858714edd
No known key found for this signature in database
GPG Key ID: 3627F3144076AE63

View File

@ -477,7 +477,7 @@ void *load_nodeslist_thread(void *data)
/* If nodeslist does not contain any valid entries we set the last_scan value
* to 0 so that it will fetch a new list the next time this function is called.
*/
if (idx == 0) {
if (Nodes.count == 0) {
const char *s = "{\"last_scan\":0}";
rewind(fp);
fwrite(s, strlen(s), 1, fp); // Not much we can do if it fails