summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/Camera.cpp2
-rw-r--r--src/core/World.cpp4
2 files changed, 4 insertions, 2 deletions
diff --git a/src/core/Camera.cpp b/src/core/Camera.cpp
index a6cf71f1..5d2768de 100644
--- a/src/core/Camera.cpp
+++ b/src/core/Camera.cpp
@@ -3621,6 +3621,8 @@ CCamera::LoadPathSplines(int file)
m_arrPathArray[i].m_arr_PathData[j] = atof(token);
i++;
j = 0;
+ if (i == MAX_NUM_OF_SPLINETYPES)
+ reading = false;
memset(token, 0, 32);
n = 0;
}
diff --git a/src/core/World.cpp b/src/core/World.cpp
index bc104fe9..7581a8b0 100644
--- a/src/core/World.cpp
+++ b/src/core/World.cpp
@@ -1164,8 +1164,8 @@ CWorld::FindObjectsIntersectingCube(const CVector &vecStartPos, const CVector &v
const int32 nEndX = Min(GetSectorIndexX(vecStartPos.x), NUMSECTORS_X - 1);
const int32 nEndY = Min(GetSectorIndexY(vecStartPos.y), NUMSECTORS_Y - 1);
#else
- const int32 nEndX = Min(GetSectorIndexX(vecSectorPos.x), NUMSECTORS_X);
- const int32 nEndY = Min(GetSectorIndexY(vecSectorPos.y), NUMSECTORS_Y);
+ const int32 nEndX = Min(GetSectorIndexX(vecStartPos.x), NUMSECTORS_X);
+ const int32 nEndY = Min(GetSectorIndexY(vecStartPos.y), NUMSECTORS_Y);
#endif
for(int32 y = nStartY; y <= nEndY; y++) {
for(int32 x = nStartX; x <= nEndX; x++) {