diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-07-03 03:05:44 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-07-03 03:05:44 +0000 |
commit | c26945bf2d7b15d0c3bebb722215c44776be15cf (patch) | |
tree | 48d7435aab2c99cc32806414857d717d15c57330 | |
parent | 84b38b08ddec5342fe8775d8eadaa858db8cf355 (diff) | |
download | crawl-ref-c26945bf2d7b15d0c3bebb722215c44776be15cf.tar.gz crawl-ref-c26945bf2d7b15d0c3bebb722215c44776be15cf.zip |
Fix [2009377]: In _handle_behaviour(), initialize e_index to -1, so that
we don't try to access a nonexistent stored level exit.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6362 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r-- | crawl-ref/source/monstuff.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc index a3075f5b1f..2fd9b03ada 100644 --- a/crawl-ref/source/monstuff.cc +++ b/crawl-ref/source/monstuff.cc @@ -2520,7 +2520,7 @@ static void _handle_behaviour(monsters *mon) bool travelling = mon->is_travelling(); bool patrolling = mon->is_patrolling(); static std::vector<level_exit> e; - static int e_index; + static int e_index = -1; // Check for confusion -- early out. if (mon->has_ench(ENCH_CONFUSION)) { |