diff --git a/core/src/packets.cpp b/core/src/packets.cpp index 9fdb5e2..5e16d4f 100644 --- a/core/src/packets.cpp +++ b/core/src/packets.cpp @@ -378,7 +378,7 @@ void AOClient::pktRemoveEvidence(AreaData* area, int argc, QStringList argv, AOP return; bool is_int = false; int idx = argv[0].toInt(&is_int); - if (is_int && idx <= area->evidence().size() && idx >= 0) { + if (is_int && idx < area->evidence().size() && idx >= 0) { area->deleteEvidence(idx); } sendEvidenceList(area); @@ -391,7 +391,7 @@ void AOClient::pktEditEvidence(AreaData* area, int argc, QStringList argv, AOPac bool is_int = false; int idx = argv[0].toInt(&is_int); AreaData::Evidence evi = {argv[1], argv[2], argv[3]}; - if (is_int && idx <= area->evidence().size() && idx >= 0) { + if (is_int && idx < area->evidence().size() && idx >= 0) { area->replaceEvidence(idx, evi); } sendEvidenceList(area);