#44190: S3_0 compat mode depends on uninitialized category Open Date: 2022-03-26 10:07 Last Update: 2022-04-15 06:30 URL for this Ticket: https://osdn.net//projects/freeciv/ticket/44190 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=44190 --------------------------------------------------------------------- Last Changes/Comment on this Ticket: 2022-04-15 06:30 Updated by: cazfi * Owner Update from (None) to cazfi * Resolution Update from None to Accepted --------------------------------------------------------------------- Ticket Status: Reporter: cazfi Owner: cazfi Type: Bugs Status: Open [Owner assigned] Priority: 5 - Medium MileStone: 3.0.2 Component: Server Severity: 5 - Medium Resolution: Accepted --------------------------------------------------------------------- Ticket details: S3_0 ruleset.c has this condition for loading extra information: if (!compat->compat_mode || compat->ver_terrain >= 10 || pextra->category != ECAT_RESOURCE) { The idea is that resource type extras, that did not exist in 2.6 format, are not loaded here. They have been set up already. The problem is that pextra->category is set on this point *only* if there was such an ECAT_RESOURCE setup already. With bad luck, the category could have value ECAT_RESOURCE even when there's not been that setup, but the value is uninitialized. As this is 2.6 -> 3.0 compatibility code, no other branches are affected. -- 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/44190 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=44190