Skip to content

Commit bc9290d

Browse files
committed
fix off-by-one in furniture stockpile export
fixes #5557
1 parent d295136 commit bc9290d

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

docs/changelog.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ Template for new versions:
5959

6060
## Fixes
6161
- ``Units::getReadableName`` will no longer append a comma to the names of histfigs with no profession
62+
- `stockpiles`: fixed off-by-one error in exporting furniture stockpiles
6263

6364
## Misc Improvements
6465

plugins/stockpiles/StockpileSerializer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1741,7 +1741,7 @@ bool StockpileSettingsSerializer::write_furniture(color_ostream& out, StockpileS
17411741
all = false;
17421742
continue;
17431743
}
1744-
string f_type(type_traits::key_table[i]);
1744+
string f_type{ENUM_KEY_STR(furniture_type, furniture_type(i))};
17451745
furniture->add_type(f_type);
17461746
DEBUG(log, out).print("furniture_type %zd is %s\n", i, f_type.c_str());
17471747
}

0 commit comments

Comments
 (0)