Skip to content

Commit b0f1c6e

Browse files
committed
Fix divide-by-zero in weapon stat comparison
1 parent ab84ff9 commit b0f1c6e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

data/modules/Equipment/Stats.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ end
5858
---@class Equipment.LaserType
5959
local LaserType = EquipTypes.LaserType
6060

61-
local format_rpm = function(v) return string.format("%d RPM", 60 / v) end
61+
local format_rpm = function(v) return string.format("%d RPM", v == 0 and 0 or 60 / v) end
6262
local format_speed = function(v) return string.format("%.1f%s", v, lc.UNIT_METERS_PER_SECOND) end
6363

6464
function LaserType:GetDetailedStats()

0 commit comments

Comments
 (0)