summaryrefslogtreecommitdiff
path: root/riscos/gui.c
diff options
context:
space:
mode:
Diffstat (limited to 'riscos/gui.c')
-rw-r--r--riscos/gui.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/riscos/gui.c b/riscos/gui.c
index 49c71f77e..054defba7 100644
--- a/riscos/gui.c
+++ b/riscos/gui.c
@@ -927,9 +927,10 @@ void gui_gadget_combo(struct browser_window* bw, struct form_control* g, unsigne
combo_menu->entries[count].sub_menu = wimp_NO_SUB_MENU;
combo_menu->entries[count].icon_flags = wimp_ICON_TEXT | wimp_ICON_INDIRECTED | wimp_ICON_FILLED | wimp_ICON_VCENTRED | (wimp_COLOUR_BLACK << wimp_ICON_FG_COLOUR_SHIFT) | (wimp_COLOUR_WHITE << wimp_ICON_BG_COLOUR_SHIFT) | (wimp_BUTTON_MENU_ICON << wimp_ICON_BUTTON_TYPE_SHIFT);
- combo_menu->entries[count].data.indirected_text.text = o->text;
+ /* \todo combo_menu->entries[count].data.indirected_text.text needs to be free() when menu gets closed. */
+ combo_menu->entries[count].data.indirected_text.text = cnv_str_local_enc(o->text);
combo_menu->entries[count].data.indirected_text.validation = "\0";
- combo_menu->entries[count].data.indirected_text.size = strlen(o->text) + 1;
+ combo_menu->entries[count].data.indirected_text.size = strlen(combo_menu->entries[count].data.indirected_text.text) + 1;
}
wimp_get_pointer_info(&pointer);