diff --git a/src/Nanos.cpp b/src/Nanos.cpp index 74a85c1..c6d4adf 100644 --- a/src/Nanos.cpp +++ b/src/Nanos.cpp @@ -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;