From aae39fe65651d0ae2d3678afac8a8e245b836ef8 Mon Sep 17 00:00:00 2001 From: Abdelrahman Said Date: Mon, 5 May 2025 16:41:56 +0100 Subject: [PATCH] Fix MSVC errors --- tests/array/test_i32_array.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/array/test_i32_array.c b/tests/array/test_i32_array.c index 5206c0c..b9102d3 100644 --- a/tests/array/test_i32_array.c +++ b/tests/array/test_i32_array.c @@ -62,7 +62,8 @@ TestFuncResult test_i32_array_set(void) { u64 index = 0; bool running = true; while (running) { - wapp_i32_array_set(&array, index, &((i32){index * 2})); + i32 num = (i32)(index * 2); + wapp_i32_array_set(&array, index, &num); item = wapp_i32_array_get(&array, index); result = result && item && (*item == (i32)(index * 2)); @@ -202,7 +203,8 @@ TestFuncResult test_i32_array_append_alloc(void) { u64 index = 0; bool running = true; while (running) { - arr_ptr = wapp_i32_array_append_alloc(&allocator, &array2, &((i32){index})); + i32 num = (i32)index; + arr_ptr = wapp_i32_array_append_alloc(&allocator, &array2, &num); ++index; running = index < count;