#45894: Extra build slot units not checked for build legality Open Date: 2022-10-17 15:03 Last Update: 2023-09-06 15:47 URL for this Ticket: https://osdn.net//projects/freeciv/ticket/45894 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=45894 --------------------------------------------------------------------- Last Changes/Comment on this Ticket: 2023-09-06 15:47 Updated by: cazfi * Owner Update from cazfi to (None) --------------------------------------------------------------------- Ticket Status: Reporter: (Anonymous) Owner: (None) Type: Bugs Status: Open Priority: 5 - Medium MileStone: (None) Component: (None) Severity: 5 - Medium Resolution: None --------------------------------------------------------------------- Ticket details: This allowed an exploit where one could "stash shields" (e.g., in a Battleship), then change to a cheap legal unit followed in the queue by a unit you can't build. This made it possible to make Helicopters, Howitzers, and Stealth Bombers well before the tech was available! Blamed: city_build_unit()... does check for current prod but not later worklist units. Needs an if such as /* Multislot units also need to be checked for build legality, * otherwise you can make Howitzers in the feudal age! */ if (can_city_build_unit_direct(pcity, utype)) { punit = city_create_unit(pcity, utype); } else punit = NULL; -- Ticket information of Freeciv project Freeciv Project is hosted on OSDN Project URL: https://osdn.net/projects/freeciv/ OSDN: https://osdn.net URL for this Ticket: https://osdn.net/projects/freeciv/ticket/45894 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=45894