mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2025-10-20 04:10:50 +00:00
Improve DB and Nano sanity checks
I'm aware that the DB checks still allow ID 0 items and Nanos, but the point of those is primarily to prevent invalid memory access.
This commit is contained in:
@@ -240,7 +240,7 @@ void NanoManager::nanoPotionHandler(CNSocket* sock, CNPacketData* data) {
|
||||
|
||||
#pragma region Helper methods
|
||||
void NanoManager::addNano(CNSocket* sock, int16_t nanoID, int16_t slot, bool spendfm) {
|
||||
if (nanoID >= NANO_COUNT)
|
||||
if (nanoID <= 0 || nanoID >= NANO_COUNT)
|
||||
return;
|
||||
|
||||
Player *plr = PlayerManager::getPlayer(sock);
|
||||
|
Reference in New Issue
Block a user