diff options
Diffstat (limited to 'testing/Messenger_test.c')
-rw-r--r-- | testing/Messenger_test.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/testing/Messenger_test.c b/testing/Messenger_test.c index 969d6b1f..895a23d9 100644 --- a/testing/Messenger_test.c +++ b/testing/Messenger_test.c | |||
@@ -161,14 +161,16 @@ int main(int argc, char *argv[]) | |||
161 | 161 | ||
162 | setname(m, (uint8_t *)"Anon", 5); | 162 | setname(m, (uint8_t *)"Anon", 5); |
163 | 163 | ||
164 | char temp_id[128]; | 164 | char temp_hex_id[128]; |
165 | printf("\nEnter the address of the friend you wish to add (38 bytes HEX format):\n"); | 165 | printf("\nEnter the address of the friend you wish to add (38 bytes HEX format):\n"); |
166 | 166 | ||
167 | if (scanf("%s", temp_id) != 1) { | 167 | if (scanf("%s", temp_hex_id) != 1) { |
168 | return 1; | 168 | return 1; |
169 | } | 169 | } |
170 | 170 | ||
171 | int num = m_addfriend(m, hex_string_to_bin(temp_id), (uint8_t *)"Install Gentoo", sizeof("Install Gentoo")); | 171 | uint8_t *bin_id = hex_string_to_bin(temp_hex_id); |
172 | int num = m_addfriend(m, bin_id, (uint8_t *)"Install Gentoo", sizeof("Install Gentoo")); | ||
173 | free(bin_id); | ||
172 | 174 | ||
173 | perror("Initialization"); | 175 | perror("Initialization"); |
174 | 176 | ||