Skip to content

Commit

Permalink
Fixed bug: plugin crashed if a scroll of create monster is used in pa…
Browse files Browse the repository at this point in the history
…ssage

access rooms[-1] in aim_monster()
  • Loading branch information
katono committed Sep 16, 2014
1 parent 96a17e2 commit 9401598
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions autoload/rogue/monster.lua
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,10 @@ end

local function aim_monster(monster)
local rn = g.get_room_number(monster.row, monster.col)
if rn == g.NO_ROOM then
-- fixed original bug: access rooms[-1]
return
end
local r = g.get_rand(0, 12)

for i = 0, 3 do
Expand Down

0 comments on commit 9401598

Please sign in to comment.