Fix possible crash when using shift+enter on cells that don't have labors

develop
Quietust 2012-11-24 10:36:32 -06:00
parent 4dfe46e26f
commit cdc44b74f2
1 changed files with 1 additions and 1 deletions

@ -842,7 +842,7 @@ void viewscreen_unitlaborsst::feed(set<df::interface_key> *events)
{ {
df::unit *unit = cur->unit; df::unit *unit = cur->unit;
const SkillColumn &col = columns[input_column]; const SkillColumn &col = columns[input_column];
bool newstatus = !unit->status.labors[col.labor]; bool newstatus = (col.labor == unit_labor::NONE) ? true : !unit->status.labors[col.labor];
for (int i = 0; i < NUM_COLUMNS; i++) for (int i = 0; i < NUM_COLUMNS; i++)
{ {
if (columns[i].group != col.group) if (columns[i].group != col.group)