Fix persistent histfig crashbug.

develop
expwnent 2016-03-10 08:38:55 -05:00
parent cbb4275a44
commit fd132d3fe7
3 changed files with 9 additions and 1 deletions

@ -89,6 +89,8 @@ Fixes
- `showmood`: Fixed name display on OS X/Linux
- Fixed a crash bug caused by the historical figures DFHack uses to store persistent data.
Misc Improvements
-----------------
- `autolabor`, `autohauler`, `manipulator`: Added support for new jobs/labors/skills

@ -16,6 +16,7 @@
#include "df/general_ref_type.h"
#include "df/general_ref_unit_workerst.h"
#include "df/global_objects.h"
#include "df/historical_figure.h"
#include "df/interaction.h"
#include "df/item.h"
#include "df/item_actual.h"
@ -296,6 +297,11 @@ void DFHack::EventManager::onStateChange(color_ostream& out, state_change_event
for ( size_t a = 0; a < EventType::EVENT_MAX; a++ ) {
eventLastTick[a] = -1;//-1000000;
}
for ( size_t a = 0; a < df::global::world->history.figures.size(); a++ ) {
df::historical_figure* unit = df::global::world->history.figures[a];
if ( unit->name.language < 0 )
unit->name.language = 0;
}
gameLoaded = true;
}

@ -1 +1 @@
Subproject commit 746e1ced2b34b4f433e816954d1c9cfbb527a6b5
Subproject commit 90645ebd8e8433196d695a478e3d6c9a32add21d