Fixed memory leak in ExecutingAttack.
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Deukhoofd 2020-05-27 18:29:52 +02:00
parent fcc6f2214e
commit a9740cb1eb
Signed by: Deukhoofd
GPG Key ID: ADF2E9256009EDCE
1 changed files with 4 additions and 1 deletions

View File

@ -57,7 +57,10 @@ namespace CreatureLib::Battling {
ExecutingAttack(const ExecutingAttack&) = delete;
ExecutingAttack& operator=(const ExecutingAttack&) = delete;
virtual ~ExecutingAttack() noexcept { delete _script; };
virtual ~ExecutingAttack() noexcept {
delete _script;
delete[] _hits;
};
HitData& GetHitData(Creature* creature, uint8_t hit) {
for (size_t i = 0; i < _targets.Count(); i++) {