mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-09 04:27:42 +00:00
Fix infinite loop in CObjectList, and add an assert to detect invalid assignments
This commit is contained in:
@@ -3,8 +3,8 @@
|
||||
namespace urde {
|
||||
|
||||
void CWeaponMgr::Add(TUniqueId uid, EWeaponType type) {
|
||||
x0_weapons.insert(std::make_pair(uid, rstl::reserved_vector<s32, 10>()));
|
||||
x0_weapons[uid].resize(10);
|
||||
x0_weapons.insert(std::make_pair(uid, rstl::reserved_vector<s32, 15>()));
|
||||
x0_weapons[uid].resize(15);
|
||||
++x0_weapons[uid][u32(type)];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user