Fix bug causing vector removal to skip elements

This commit is contained in:
Alex
2023-04-20 03:24:23 +03:00
parent ad1bcdab47
commit 0eb8ba0f69
8 changed files with 16 additions and 12 deletions

View File

@ -83,8 +83,8 @@ namespace Driver
}
if (drv.MemTrk)
delete drv.MemTrk, drv.MemTrk = nullptr;
Drivers.remove(drv);
}
Drivers.clear();
}
bool Driver::UnloadDriver(unsigned long DUID)
@ -268,7 +268,10 @@ namespace Driver
{
SmartLock(DriverInterruptLock); /* Lock in case of multiple interrupts firing at the same time */
if (!this->Enabled)
{
debug("Interrupt hook is not enabled");
return;
}
if (!Handle.InterruptCallback)
{