Skip to content

Commit

Permalink
Convert age argument to number in rejuvenate.lua
Browse files Browse the repository at this point in the history
due to the less than comparison, age must be converted to a number or else any attempt to use that argument causes the script to fail with "attempt to compare string with number".
  • Loading branch information
Eldresh authored Nov 27, 2024
1 parent 33c6bce commit 18f48dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rejuvenate.lua
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ local function main(args)
table.insert(units, dfhack.gui.getSelectedUnit(true) or qerror("Please select a unit in the UI."))
end
for _, u in ipairs(units) do
rejuvenate(u, false, args.force, args['dry-run'], args.age)
rejuvenate(u, false, args.force, args['dry-run'], tonumber(args.age))
end
end

Expand Down

0 comments on commit 18f48dc

Please sign in to comment.