From 4c9e7ed09e8a09143d61e9d18de877adeadd65c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Sun, 7 Nov 2021 18:13:03 +0100 Subject: [PATCH] tests: fix allocation of test_ptr_1_hashtable_dyn in hdata tests --- tests/unit/core/test-core-hdata.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/unit/core/test-core-hdata.cpp b/tests/unit/core/test-core-hdata.cpp index d6e76b7fb..846c58006 100644 --- a/tests/unit/core/test-core-hdata.cpp +++ b/tests/unit/core/test-core-hdata.cpp @@ -459,7 +459,7 @@ TEST_GROUP(CoreHdataWithList) hashtable_set (item->test_ptr_2_hashtable[1], "key1.2", "value1.2"); item->test_ptr_1_hashtable_dyn = (struct t_hashtable **)malloc ( - 1 * sizeof (item->test_ptr_2_hashtable[0])); + 2 * sizeof (item->test_ptr_1_hashtable_dyn[0])); item->test_ptr_1_hashtable_dyn[0] = hashtable_new ( 8, WEECHAT_HASHTABLE_STRING, @@ -607,7 +607,7 @@ TEST_GROUP(CoreHdataWithList) hashtable_set (item->test_ptr_2_hashtable[1], "key2.2", "value2.2"); item->test_ptr_1_hashtable_dyn = (struct t_hashtable **)malloc ( - 1 * sizeof (item->test_ptr_2_hashtable[0])); + 2 * sizeof (item->test_ptr_1_hashtable_dyn[0])); item->test_ptr_1_hashtable_dyn[0] = hashtable_new ( 8, WEECHAT_HASHTABLE_STRING,