Compare commits

...

3 Commits

Author SHA1 Message Date
Maxime Leroy
c6097089cf
Merge 7f3b56c28b into 4399ff0fd4 2025-10-24 12:14:13 +02:00
GAMMACASE
4399ff0fd4
Trigger build for hl2sdk-cs2 update 2025-10-15 15:42:47 +03:00
maxime1907
7f3b56c28b fix: ispaused invalid iterator 2025-02-04 21:09:42 +01:00
2 changed files with 13 additions and 2 deletions

View File

@ -256,9 +256,20 @@ namespace SourceHook
ICleanupTask *m_CleanupTask;
bool isValidIterator(List<CHook>::iterator &myIter, List<CHook> &myList) {
for (auto iter = myList.begin(); iter != myList.end(); ++iter) {
if (iter == myIter) {
return true;
}
}
return false;
}
void SkipPaused(List<CHook>::iterator &iter, List<CHook> &list)
{
while (iter != list.end() && iter->IsPaused())
if (!iter || !isValidIterator(iter, list))
iter = list.end();
while (iter != list.end() && iter && iter->IsPaused())
++iter;
}
public:

View File

@ -40,4 +40,4 @@ msvc2015, take two
"something witty" - Fishy!
thisisawfuldotnetcom
iluvwomen99
Hi all, I'm new in here!!!!!!!!
Hi all, I'm new in here!!!!!!!!!