aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_heap.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_heap.c')
-rw-r--r--tests/test_heap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/test_heap.c b/tests/test_heap.c
index cb0bcffcc..de48f0ae4 100644
--- a/tests/test_heap.c
+++ b/tests/test_heap.c
@@ -241,7 +241,7 @@ AST_TEST_DEFINE(heap_test_3)
i = test_size / 10;
while (i--) {
- random_index = ast_random() % test_size - 1;
+ random_index = ast_random() % test_size;
node = ast_heap_remove(h, &nodes[random_index]);
if (nodes[random_index].val != node->val){
ast_test_status_update(test, "Failed to remove what we expected to\n");