diff options
author | Adam Borowski <kilobyte@angband.pl> | 2012-09-22 00:12:36 +0200 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2012-09-22 00:19:58 +0200 |
commit | 3842138bd0d4c4a1649e449345d3112b81016c99 (patch) | |
tree | 323ef1c4d8759df6aaade581cf067de2ba940d94 /crawl-ref/source/dbg-util.cc | |
parent | 357f8d0d6a867f6a3ac09a9a8daec5d9a49893c9 (diff) | |
download | crawl-ref-3842138bd0d4c4a1649e449345d3112b81016c99.tar.gz crawl-ref-3842138bd0d4c4a1649e449345d3112b81016c99.zip |
Fix two crasher bugs when walking long enough in the Abyss.
_you_vault_list would overflow once you found 256 vaults that got shifted
away. env.props["level_{vaults,extra}_key"] could potentially overflow as
well, although the latter would require running with an amulet of statis on
as abyssal "new area" teleports cleared that prop.
This commit also fixes Pan vault info keeping only the last level generated;
Pan char dumps get quite spammy now. Perhaps refcounting them would be
better?
Diffstat (limited to 'crawl-ref/source/dbg-util.cc')
-rw-r--r-- | crawl-ref/source/dbg-util.cc | 25 |
1 files changed, 3 insertions, 22 deletions
diff --git a/crawl-ref/source/dbg-util.cc b/crawl-ref/source/dbg-util.cc index d3c9061aeb..9c982d2e01 100644 --- a/crawl-ref/source/dbg-util.cc +++ b/crawl-ref/source/dbg-util.cc @@ -36,18 +36,6 @@ monster_type debug_prompt_for_monster(void) return MONS_NO_MONSTER; } -static void _dump_vault_table(const CrawlHashTable &table) -{ - if (!table.empty()) - { - CrawlHashTable::const_iterator i = table.begin(); - - for (; i != table.end(); ++i) - mprf(" %s: %s", i->first.c_str(), - i->second.get_string().c_str()); - } -} - void debug_dump_levgen() { if (crawl_state.game_is_arena()) @@ -81,18 +69,11 @@ void debug_dump_levgen() mprf("Level build method = %s, level layout type = %s, absdepth0 = %d", method.c_str(), type.c_str(), env.absdepth0); - if (props.exists(LEVEL_EXTRAS_KEY)) - { - mpr("Level extras:"); - const CrawlHashTable &extras = props[LEVEL_EXTRAS_KEY].get_table(); - _dump_vault_table(extras); - } - - if (props.exists(LEVEL_VAULTS_KEY)) + if (!env.level_vault_list.empty()) { mpr("Level vaults:"); - const CrawlHashTable &vaults = props[LEVEL_VAULTS_KEY].get_table(); - _dump_vault_table(vaults); + for (size_t i = 0; i < env.level_vault_list.size(); ++i) + mprf(" %s", env.level_vault_list[i].c_str()); } mpr(""); } |