From 87dd6becf78597ef3c82014a0f8199e51b43a525 Mon Sep 17 00:00:00 2001 From: pyruvate Date: Mon, 28 Jul 2014 02:54:43 +0300 Subject: [PATCH] Fix test_many_clients in tox_test Stack variable to_comp goes out of scope, but a reference to the variable is used later in Fiend_Requests. --- auto_tests/tox_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/auto_tests/tox_test.c b/auto_tests/tox_test.c index 1a3c5868..8d4d6c4b 100644 --- a/auto_tests/tox_test.c +++ b/auto_tests/tox_test.c @@ -294,11 +294,11 @@ START_TEST(test_many_clients) long long unsigned int cur_time = time(NULL); Tox *toxes[NUM_TOXES]; uint32_t i, j; + uint32_t to_comp = 974536; for (i = 0; i < NUM_TOXES; ++i) { toxes[i] = tox_new(TOX_ENABLE_IPV6_DEFAULT); ck_assert_msg(toxes[i] != 0, "Failed to create tox instances %u", i); - uint32_t to_comp = 974536; tox_callback_friend_request(toxes[i], accept_friend_request, &to_comp); }