summaryrefslogtreecommitdiffstats
path: root/src/peds/Ped.cpp
diff options
context:
space:
mode:
authorMagnus Larsen <golgothasTerror101@gmail.com>2021-07-13 08:51:28 +0200
committerMagnus Larsen <golgothasTerror101@gmail.com>2021-07-13 08:51:28 +0200
commit894495689f860631fa2f084769473296281a0d85 (patch)
tree68bba34bb97c48e23f17589e98decd1ceb4d2342 /src/peds/Ped.cpp
parentPhysical: division by zero fix (diff)
downloadre3-894495689f860631fa2f084769473296281a0d85.tar
re3-894495689f860631fa2f084769473296281a0d85.tar.gz
re3-894495689f860631fa2f084769473296281a0d85.tar.bz2
re3-894495689f860631fa2f084769473296281a0d85.tar.lz
re3-894495689f860631fa2f084769473296281a0d85.tar.xz
re3-894495689f860631fa2f084769473296281a0d85.tar.zst
re3-894495689f860631fa2f084769473296281a0d85.zip
Diffstat (limited to '')
-rw-r--r--src/peds/Ped.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/peds/Ped.cpp b/src/peds/Ped.cpp
index 4d80cac2..90aebf89 100644
--- a/src/peds/Ped.cpp
+++ b/src/peds/Ped.cpp
@@ -326,6 +326,7 @@ CPed::~CPed(void)
nearPed->m_nearPeds[k] = nearPed->m_nearPeds[k + 1];
nearPed->m_nearPeds[k + 1] = nil;
}
+ nearPed->m_nearPeds[ARRAY_SIZE(m_nearPeds) - 1] = nil;
nearPed->m_numNearPeds--;
} else
j++;