Fixed regression in CellFilter GetRecipientIndex reading oob (bug 5826, r=psychonic).
Fixed regression in CellFilter GetRecipientIndex reading oob (
bug 5826, r=psychonic).
1.1 --- a/core/CellRecipientFilter.h Sat Aug 03 19:03:12 2013 -0400
1.2 +++ b/core/CellRecipientFilter.h Sat Aug 03 19:20:03 2013 -0400
1.3 @@ -94,7 +94,10 @@
1.4 {
1.5 ret = -1;
1.6 }
1.7 - ret = static_cast<int>(m_Players[slot]);
1.8 + else
1.9 + {
1.10 + ret = static_cast<int>(m_Players[slot]);
1.11 + }
1.12
1.13 #if SOURCE_ENGINE == SE_DOTA
1.14 return CEntityIndex(ret);
2.1 --- a/extensions/sdktools/CellRecipientFilter.h Sat Aug 03 19:03:12 2013 -0400
2.2 +++ b/extensions/sdktools/CellRecipientFilter.h Sat Aug 03 19:20:03 2013 -0400
2.3 @@ -94,7 +94,10 @@
2.4 {
2.5 ret = -1;
2.6 }
2.7 - ret = static_cast<int>(m_Players[slot]);
2.8 + else
2.9 + {
2.10 + ret = static_cast<int>(m_Players[slot]);
2.11 + }
2.12
2.13 #if SOURCE_ENGINE == SE_DOTA
2.14 return CEntityIndex(ret);