Skip to content

Commit

Permalink
Fix for DFHack 0.44.05-r2 structures change
Browse files Browse the repository at this point in the history
  • Loading branch information
BenLubar committed Feb 22, 2018
1 parent 6b92546 commit ec8d078
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions population_military.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -711,11 +711,8 @@ class MilitarySquadAttackExclusive : public ExclusiveCallback
return;
}

auto unit_pos = unit_it - ui->squads.kill_targets.begin();
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
auto first_unit = static_cast<ptrdiff_t>(*reinterpret_cast<int32_t *>(&ui->squads.anon_3));
#pragma GCC diagnostic pop
auto unit_pos = int32_t(unit_it - ui->squads.kill_targets.begin());
auto first_unit = ui->squads.unk_f0;

While([&]() -> bool { return first_unit > unit_pos; }, [&]()
{
Expand Down

0 comments on commit ec8d078

Please sign in to comment.