summaryrefslogtreecommitdiff
path: root/testing
diff options
context:
space:
mode:
Diffstat (limited to 'testing')
-rw-r--r--testing/nTox_win32.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/testing/nTox_win32.c b/testing/nTox_win32.c
index 32887586..3b6fb043 100644
--- a/testing/nTox_win32.c
+++ b/testing/nTox_win32.c
@@ -106,6 +106,7 @@ void load_key()
106 int size = Messenger_size(); 106 int size = Messenger_size();
107 uint8_t data[size]; 107 uint8_t data[size];
108 Messenger_save(data); 108 Messenger_save(data);
109 fclose(data_file);
109 data_file = fopen("data", "w"); 110 data_file = fopen("data", "w");
110 111
111 if (fwrite(data, sizeof(uint8_t), size, data_file) != size) { 112 if (fwrite(data, sizeof(uint8_t), size, data_file) != size) {
@@ -366,8 +367,9 @@ int main(int argc, char *argv[])
366 setname(name, strlen((char*)name)+1); 367 setname(name, strlen((char*)name)+1);
367 nameloaded = 1; 368 nameloaded = 1;
368 printf("%s\n", name); 369 printf("%s\n", name);
370 fclose(name_file);
369 } 371 }
370 fclose(name_file); 372
371 373
372 FILE* status_file = NULL; 374 FILE* status_file = NULL;
373 status_file = fopen("statusfile.txt", "r"); 375 status_file = fopen("statusfile.txt", "r");
@@ -379,8 +381,9 @@ int main(int argc, char *argv[])
379 m_set_userstatus(status, strlen((char*)status)+1); 381 m_set_userstatus(status, strlen((char*)status)+1);
380 statusloaded = 1; 382 statusloaded = 1;
381 printf("%s\n", status); 383 printf("%s\n", status);
384 fclose(status_file);
382 } 385 }
383 fclose(status_file); 386
384 387
385 m_callback_friendrequest(print_request); 388 m_callback_friendrequest(print_request);
386 m_callback_friendmessage(print_message); 389 m_callback_friendmessage(print_message);