summaryrefslogtreecommitdiff
path: root/testing/nTox.c
diff options
context:
space:
mode:
Diffstat (limited to 'testing/nTox.c')
-rw-r--r--testing/nTox.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/testing/nTox.c b/testing/nTox.c
index 77f812b5..03f17da5 100644
--- a/testing/nTox.c
+++ b/testing/nTox.c
@@ -942,7 +942,17 @@ static Tox *load_data()
942 return 0; 942 return 0;
943 } 943 }
944 944
945 Tox *m = tox_new(0, data, size, NULL); 945 struct Tox_Options options;
946
947 tox_options_default(&options);
948
949 options.savedata_type = TOX_SAVEDATA_TYPE_TOX_SAVE;
950
951 options.savedata_data = data;
952
953 options.savedata_length = size;
954
955 Tox *m = tox_new(&options, NULL);
946 956
947 if (fclose(data_file) < 0) { 957 if (fclose(data_file) < 0) {
948 perror("[!] fclose failed"); 958 perror("[!] fclose failed");
@@ -953,7 +963,7 @@ static Tox *load_data()
953 return m; 963 return m;
954 } 964 }
955 965
956 return tox_new(0, 0, 0, NULL); 966 return tox_new(NULL, NULL);
957} 967}
958 968
959static int save_data(Tox *m) 969static int save_data(Tox *m)