1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-10-02 03:46:21 -04:00

Use intdup for the new form menu because you can't just put an int in

a void * and expect it to work everywhere.
This commit is contained in:
Miciah Dashiel Butler Masters 2005-12-26 11:25:03 +00:00 committed by Miciah Dashiel Butler Masters
parent a33547d8ad
commit bcdc69e86a

View File

@ -1622,7 +1622,9 @@ link_form_menu_func(struct terminal *term, void *link_number_, void *ses_)
{
struct session *ses = ses_;
struct document_view *doc_view;
int link_number = (int) link_number_;
int link_number = *(int *) link_number_;
mem_free(link_number_);
assert(term && ses);
if_assert_failed return;
@ -1702,7 +1704,8 @@ link_form_menu(struct terminal *term, void *xxx, void *ses_)
if (!rtext) rtext = fc->alt;
add_to_menu(&mi, str.source, rtext, ACT_MAIN_NONE,
link_form_menu_func, (void *) link_number, 0);
link_form_menu_func, intdup(link_number),
FREE_DATA);
}
do_menu(term, mi, ses, 1);