diff options
author | Adam Borowski <kilobyte@angband.pl> | 2012-06-09 21:32:08 +0200 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2012-06-09 21:32:08 +0200 |
commit | c56721eb37afb6956ea0c44ed48f0962e1acbb23 (patch) | |
tree | 5f20d77070850fbad8672a52cbe854108fb9916a /crawl-ref/source/database.cc | |
parent | 5b657aeec82ea053a4e21a597519b262df3933ef (diff) | |
download | crawl-ref-c56721eb37afb6956ea0c44ed48f0962e1acbb23.tar.gz crawl-ref-c56721eb37afb6956ea0c44ed48f0962e1acbb23.zip |
Kludge around coloured database entries not showing.
One-line ones are still broken, this kludge assumes everything that matches
/^<([^\n]*)>\n$/s is an alias reference.
The choice of syntax wasn't most fortunate...
Diffstat (limited to 'crawl-ref/source/database.cc')
-rw-r--r-- | crawl-ref/source/database.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crawl-ref/source/database.cc b/crawl-ref/source/database.cc index 5bad9bb43a..85e412daee 100644 --- a/crawl-ref/source/database.cc +++ b/crawl-ref/source/database.cc @@ -732,7 +732,8 @@ static std::string _query_database(TextDB &db, std::string key, std::string str((const char *)result.dptr, result.dsize); // <foo> is an alias to key foo - if (str[0] == '<' and str[str.size() - 2] == '>') + if (str[0] == '<' and str[str.size() - 2] == '>' + && str.find("\n") == str.size() - 1) { return _query_database(db, str.substr(1, str.size() - 3), canonicalise_key, run_lua, untranslated); |