diff options
Diffstat (limited to 'testing/nTox.c')
-rw-r--r-- | testing/nTox.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/testing/nTox.c b/testing/nTox.c index 4be69ac4..072c17e3 100644 --- a/testing/nTox.c +++ b/testing/nTox.c | |||
@@ -142,7 +142,9 @@ void line_eval(char *line) | |||
142 | for (i = 0; i < 128; i++) | 142 | for (i = 0; i < 128; i++) |
143 | temp_id[i] = line[i+prompt_offset]; | 143 | temp_id[i] = line[i+prompt_offset]; |
144 | 144 | ||
145 | int num = m_addfriend(hex_string_to_bin(temp_id), (uint8_t*)"Install Gentoo", sizeof("Install Gentoo")); | 145 | unsigned char *bin_string = hex_string_to_bin(temp_id); |
146 | int num = m_addfriend(bin_string, (uint8_t*)"Install Gentoo", sizeof("Install Gentoo")); | ||
147 | free(bin_string); | ||
146 | char numstring[100]; | 148 | char numstring[100]; |
147 | switch (num) { | 149 | switch (num) { |
148 | case FAERR_TOOLONG: | 150 | case FAERR_TOOLONG: |
@@ -466,7 +468,9 @@ int main(int argc, char *argv[]) | |||
466 | else | 468 | else |
467 | exit(1); | 469 | exit(1); |
468 | 470 | ||
469 | DHT_bootstrap(bootstrap_ip_port, hex_string_to_bin(argv[3])); | 471 | unsigned char *binary_string = hex_string_to_bin(argv[3]); |
472 | DHT_bootstrap(bootstrap_ip_port, binary_string); | ||
473 | free(binary_string); | ||
470 | nodelay(stdscr, TRUE); | 474 | nodelay(stdscr, TRUE); |
471 | while(true) { | 475 | while(true) { |
472 | if (on == 0 && DHT_isconnected()) { | 476 | if (on == 0 && DHT_isconnected()) { |