From aad1b5dc9f5ef15a5ed9f973f6cae504c0275f96 Mon Sep 17 00:00:00 2001 From: Kyle Sanderson Date: Sat, 3 Aug 2013 19:20:03 -0400 Subject: [PATCH] Fixed regression in CellFilter GetRecipientIndex reading oob (bug 5826, r=psychonic). --- core/CellRecipientFilter.h | 5 ++++- extensions/sdktools/CellRecipientFilter.h | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/core/CellRecipientFilter.h b/core/CellRecipientFilter.h index 4807df5a..a047a198 100644 --- a/core/CellRecipientFilter.h +++ b/core/CellRecipientFilter.h @@ -94,7 +94,10 @@ inline int CellRecipientFilter::GetRecipientIndex(int slot) const { ret = -1; } - ret = static_cast(m_Players[slot]); + else + { + ret = static_cast(m_Players[slot]); + } #if SOURCE_ENGINE == SE_DOTA return CEntityIndex(ret); diff --git a/extensions/sdktools/CellRecipientFilter.h b/extensions/sdktools/CellRecipientFilter.h index d71ffe8d..b6e87033 100644 --- a/extensions/sdktools/CellRecipientFilter.h +++ b/extensions/sdktools/CellRecipientFilter.h @@ -94,7 +94,10 @@ inline int CellRecipientFilter::GetRecipientIndex(int slot) const { ret = -1; } - ret = static_cast(m_Players[slot]); + else + { + ret = static_cast(m_Players[slot]); + } #if SOURCE_ENGINE == SE_DOTA return CEntityIndex(ret);