[w3m-dev-en 00046] Re: Remaining difference xterm/gpm <-> sysmouse

From: Hironori Sakamoto (hsaka@mth.biglobe.ne.jp)
Date: Wed Jan 26 2000 - 21:16:05 CST


>> From: Christian Weisgerber <w3m-dev-en@mips.rhein-neckar.de>
>> I found the bug. You are right, it isn't related to the mouse.
>> In formChooseOptionByMenu(), optionMenu() is called and the variable
>> "selected" is used to set the new option value.
 :
>> Returning to formChooseOptionByMenu(), "selected" is *not initialized*
>> if the menu has been canceled, causing unpredictable results.

I understand. The following patch is effective ?

--- form.c.orig Fri Jan 14 15:13:29 2000
+++ form.c Thu Jan 27 12:12:35 2000
@@ -452,7 +452,7 @@
 void
 formChooseOptionByMenu(struct form_item_list *fi,int x,int y)
 {
- int i,n,selected,init_select = 0;
+ int i,n,selected = -1, init_select = 0;
    FormSelectOptionItem *opt;
    char **label;
-----------------------------------
Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>
 http://www2u.biglobe.ne.jp/~hsaka/



This archive was generated by hypermail 2b29 : Wed Jul 19 2000 - 10:30:43 CDT