From 1abb54856257b10f6a20a4980a31930c59e3d37c Mon Sep 17 00:00:00 2001 From: hgn Date: Wed, 31 Jan 2024 15:22:15 +0000 Subject: [PATCH] fix uninitialized --- vg_imgui.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vg_imgui.h b/vg_imgui.h index 5c957ed..b3dfa6a 100644 --- a/vg_imgui.h +++ b/vg_imgui.h @@ -1476,6 +1476,7 @@ static void ui_colourpicker( ui_rect inout_panel, const char *str_label, v4f hsv; vg_rgb_hsv( value, hsv ); + hsv[3] = value[3]; enum ui_button_state modified = 0x00; @@ -1512,6 +1513,7 @@ static void ui_colourpicker( ui_rect inout_panel, const char *str_label, if( modified & (k_ui_button_click|k_ui_button_holding_inside| k_ui_button_holding_outside) ){ vg_hsv_rgb( hsv, value ); + value[3] = hsv[3]; } ui_outline( square, 1, ui_colour( state? k_ui_fg+3: k_ui_bg+3 ), 0 ); -- 2.25.1