Skip to content

Commit

Permalink
Fix nil error if [damage] special lacks id
Browse files Browse the repository at this point in the history
  • Loading branch information
Discontinuum authored and Dugy committed Sep 11, 2023
1 parent 3ba48ee commit b71cc01
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/stats.lua
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ function wesnoth.update_stats(original)
local best_backstab_mult = 0
local best_backstab
for i = #specials,1,-1 do
if specials[i][1] == "damage" and string.match(specials[i][2].id, "backstab") then
if specials[i][1] == "damage" and specials[i][2].id and string.match(specials[i][2].id, "backstab") then
local quality = specials[i][2].multiply

if quality then
Expand Down

0 comments on commit b71cc01

Please sign in to comment.