Dungeongen: Fix out-of-voxelmanip access segfault
authorparamat <mat.gregory@virginmedia.com>
Wed, 25 Jan 2017 15:23:29 +0000 (15:23 +0000)
committersfan5 <sfan5@live.de>
Wed, 25 Jan 2017 19:34:03 +0000 (20:34 +0100)
commit9f108b56d35cb607b538562ac369c457cd129eaa
tree5e79323313fa472f9cab12f99faa8806aa921ed5
parent08911160aa5294883a7ebfb681fbf0c1a858dc78
Dungeongen: Fix out-of-voxelmanip access segfault

My recent dungeon commit allowed stairs to be placed across the full
width of corridors, but some of the new node positions accessed were
missing checks for being within the voxelmanip, causing occasional
segfaults near dungeons with corridors wider than 1 node.

Add 'vm->m_area.contains(pos)' checks just before stair position
voxelmanip access. This allows an earlier check to be removed as it
is now redundant.
src/dungeongen.cpp