879070f814
init_player_stats_new_ship used select_primary_weapon and select_secondary_weapon to assign the player's weapons. However, those functions read the current weapon and jumped according to its value. A new ship has no defined value for current weapons, so the jump triggered an uninitialized value warning from Valgrind. Add new functions set_primary_weapon, set_secondary_weapon that work like the previous select_* functions, but always take the path used for weapons not equal, without checking. This prevents the warnings from Valgrind, as well as a theoretical risk of initializing the ship improperly. |
||
---|---|---|
.. | ||
2d | ||
3d | ||
arch | ||
editor | ||
include | ||
main | ||
maths | ||
mem | ||
misc | ||
texmap | ||
ui |