fix off-by-one error in dwarfmonitor.misery widget

develop
myk002 2022-12-04 15:34:00 -08:00
parent 2ca11b0b8e
commit 1547d527b7
No known key found for this signature in database
GPG Key ID: 8A39CA0FA0C16E78
1 changed files with 1 additions and 1 deletions

@ -120,7 +120,7 @@ function MiseryWidget:overlay_onupdate()
for _,unit in ipairs(df.global.world.units.active) do
if not dfhack.units.isCitizen(unit, true) then goto continue end
local stress_category = math.min(num_colors,
dfhack.units.getStressCategory(unit))
dfhack.units.getStressCategory(unit)+1)
counts[stress_category] = (counts[stress_category] or 0) + 1
::continue::
end