rcheevos
rcheevos copied to clipboard
support passing new avatar fields across external interface
Adding the avatar fields to users, games, and achievements changed the contract for communicating with the DLL, even though the new fields were placed at the end of the structure. As the DLL doesn't yet know to send the new fields, the client could reference uninitialized (or even out-of-bounds) memory.
This adds new functions to the external interface API to pass the updated structures through. If not provided, the old functions will be called to get the old structures and the new fields will be NULLed out.
This also updates the lists created by rc_client_create_achievement_list and rc_client_create_leaderboard_list to return const references to the achievements and leaderboards.