mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2026-04-01 17:20:04 +00:00
Fix crash when receiving invalid packets with very low ids.
Also fix benign NPC deallocation bug.
This commit is contained in:
@@ -204,13 +204,13 @@ std::string Defines::p2str(int type, int val) {
|
||||
switch (type) {
|
||||
case CL2LS:
|
||||
val = val - CL2LS - 1;
|
||||
if (val > N_CL2LS)
|
||||
if (val > N_CL2LS || val < 0)
|
||||
break;
|
||||
|
||||
return cl2ls_map[val].name;
|
||||
case CL2FE:
|
||||
val = val - CL2FE - 1;
|
||||
if (val > N_CL2FE)
|
||||
if (val > N_CL2FE || val < 0)
|
||||
break;
|
||||
|
||||
return cl2fe_map[val].name;
|
||||
|
||||
Reference in New Issue
Block a user