Skip to content

Commit 9330797

Browse files
committed
Fix abort in outlines.cpp
1 parent 4cdf75c commit 9330797

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/game/client/components/tclient/outlines.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,8 @@ void COutlines::OnRender()
159159
}
160160

161161
auto GetTile = [&](int x, int y) {
162-
x = std::clamp(x, 0, m_MapDataSize.x);
163-
y = std::clamp(y, 0, m_MapDataSize.y);
162+
x = std::clamp(x, 0, m_MapDataSize.x - 1);
163+
y = std::clamp(y, 0, m_MapDataSize.y - 1);
164164
return m_pMapData[y * m_MapDataSize.x + x];
165165
};
166166

0 commit comments

Comments
 (0)