From a bug report:
The following steps do not yield the expected fruit:
1) start nethack in explore mode (with a wand of wishing)
2) change fruit name to "tomato"
3) save/restore
4) change fruit name back to "slime mold"
5) save/restore
6) wish for a fruit; you get a tomato
7) check options; fruit name is set to "slime mold"
If you specified a fruit name that already existed in the list,
fruitadd() always set current_fruit to the fruit with
the highest fid encountered in the list to that point, instead
of the fid of the matching entry.
potion explosion during failed alchemy should awaken nearby monsters
lit south wall of C quest leader's room contained dark gap at secret door spot
archeologist shouldn't start with sling skill by carrying slingable touchstone
+ensure current_fruit gets set to the correct index when setting fruit
+ option to existing entry whose fid is not the highest
Platform- and/or Interface-Specific Fixes
lastf = f;
if(f->fid > highest_fruit_id) highest_fruit_id = f->fid;
if (!strncmp(str, f->fname, PL_FSIZ-1) ||
- (*altname && !strcmp(altname, f->fname)))
+ (*altname && !strcmp(altname, f->fname))) {
+ highest_fruit_id = f->fid;
goto nonew;
+ }
}
/* if adding another fruit would overflow spe, use a random
fruit instead... we've got a lot to choose from. */