Skip to content

Commit

Permalink
view-item-info: Fix issue with maker_race == -1
Browse files Browse the repository at this point in the history
  • Loading branch information
lethosor committed Feb 10, 2018
1 parent 9693bd1 commit 28a1ccc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion view-item-info.lua
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,10 @@ function GetShieldPropertiesStringList (item)
local list = {}
append(list,"Shield properties:")
append(list,"Base block chance: "..item.subtype.blockchance,1)
append(list,"Fit for "..df.creature_raw.find(item.maker_race).name[0],1)
local craw = df.creature_raw.find(item.maker_race)
if craw then
append(list,"Fit for "..craw.name[0],1)
end
return list
end

Expand Down

0 comments on commit 28a1ccc

Please sign in to comment.