summaryrefslogtreecommitdiffstats
path: root/src/control/Pickups.cpp
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-04-20 00:04:57 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2020-04-20 00:04:57 +0200
commit7e4c68382416229cf0a58637bd9f308a6def1caa (patch)
tree61be1bbcb1242293639c1ad5a4ce3e3e72aea271 /src/control/Pickups.cpp
parentsync with master (diff)
downloadre3-7e4c68382416229cf0a58637bd9f308a6def1caa.tar
re3-7e4c68382416229cf0a58637bd9f308a6def1caa.tar.gz
re3-7e4c68382416229cf0a58637bd9f308a6def1caa.tar.bz2
re3-7e4c68382416229cf0a58637bd9f308a6def1caa.tar.lz
re3-7e4c68382416229cf0a58637bd9f308a6def1caa.tar.xz
re3-7e4c68382416229cf0a58637bd9f308a6def1caa.tar.zst
re3-7e4c68382416229cf0a58637bd9f308a6def1caa.zip
Diffstat (limited to '')
-rw-r--r--src/control/Pickups.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/control/Pickups.cpp b/src/control/Pickups.cpp
index f9605ca6..1bf6d9ce 100644
--- a/src/control/Pickups.cpp
+++ b/src/control/Pickups.cpp
@@ -491,7 +491,7 @@ CPickups::GenerateNewOne(CVector pos, uint32 modelIndex, uint8 type, uint32 quan
int32 slot = 0;
if (type == PICKUP_FLOATINGPACKAGE || type == PICKUP_NAUTICAL_MINE_INACTIVE) {
- for (slot = NUMPICKUPS; slot >= 0; slot--) {
+ for (slot = NUMPICKUPS-1; slot >= 0; slot--) {
if (aPickUps[slot].m_eType == PICKUP_NONE) {
bFreeFound = true;
break;