Fix missing validation in Nanos::nanoEquipHandler()

This commit is contained in:
dongresource 2022-02-08 12:48:58 +01:00
parent f376c68115
commit 6412a9a89e

View File

@ -226,6 +226,9 @@ static void nanoEquipHandler(CNSocket* sock, CNPacketData* data) {
if (nano->iNanoSlotNum > 2 || nano->iNanoSlotNum < 0)
return;
if (nano->iNanoID < 0 || nano->iNanoID >= NANO_COUNT)
return;
resp.iNanoID = nano->iNanoID;
resp.iNanoSlotNum = nano->iNanoSlotNum;