diff --git a/testing/DHT_test.c b/testing/DHT_test.c index 2e9c2ac2..a215463d 100644 --- a/testing/DHT_test.c +++ b/testing/DHT_test.c @@ -134,7 +134,9 @@ int main(int argc, char *argv[]) char temp_id[128]; printf("\nEnter the client_id of the friend you wish to add (32 bytes HEX format):\n"); - scanf("%s", temp_id); + if(scanf("%s", temp_id) != 1) + exit(0); + DHT_addfriend(hex_string_to_bin(temp_id)); /* initialize networking */