From 9ec44dfc70336d05867680cd0c2a99aa2789ca69 Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Wed, 11 Mar 2026 16:19:06 +0300 Subject: [PATCH] gg: Copy gg.Event results in runtime memory access error (fixes #24157) --- .../fixed_array_update_c_struct_alias_test.v | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 vlib/v/tests/fixed_array_update_c_struct_alias_test.v diff --git a/vlib/v/tests/fixed_array_update_c_struct_alias_test.v b/vlib/v/tests/fixed_array_update_c_struct_alias_test.v new file mode 100644 index 000000000..28aacf634 --- /dev/null +++ b/vlib/v/tests/fixed_array_update_c_struct_alias_test.v @@ -0,0 +1,17 @@ +module main + +import sokol.sapp + +struct Event { + touches [8]sapp.TouchPoint +} + +fn test_fixed_array_update_with_c_struct_alias() { + e := Event{} + ev := Event{ + ...e + } + assert ev.touches.len == 8 + assert ev.touches[0].identifier == 0 + assert ev.touches[7].identifier == 0 +} -- 2.39.5