summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/database.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2012-03-19 14:10:54 +0100
committerAdam Borowski <kilobyte@angband.pl>2012-03-19 14:10:54 +0100
commit24c29996b79b0f949f589d4dc723780b61b878f0 (patch)
treefd6511aa4bdda38b5561f5fe88c17d938f64e150 /crawl-ref/source/database.cc
parent905254ad75cfa1e6fe65c40256cda6386b3c4d9e (diff)
downloadcrawl-ref-24c29996b79b0f949f589d4dc723780b61b878f0.tar.gz
crawl-ref-24c29996b79b0f949f589d4dc723780b61b878f0.zip
Fix fallback to English not working in incomplete translations.
Diffstat (limited to 'crawl-ref/source/database.cc')
-rw-r--r--crawl-ref/source/database.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/crawl-ref/source/database.cc b/crawl-ref/source/database.cc
index bed981a90b..085d68a548 100644
--- a/crawl-ref/source/database.cc
+++ b/crawl-ref/source/database.cc
@@ -604,7 +604,7 @@ static std::string _getWeightedString(TextDB &db, const std::string &key,
if (db.translation)
result = _database_fetch(db.translation->get(), canonical_key);
- if (!result.dptr)
+ if (result.dsize <= 0)
result = _database_fetch(db.get(), canonical_key);
if (result.dsize <= 0)
@@ -733,7 +733,7 @@ static std::string _query_database(TextDB &db, std::string key,
if (db.translation && !untranslated)
result = _database_fetch(db.translation->get(), key);
- if (!result.dptr)
+ if (result.dsize <= 0)
result = _database_fetch(db.get(), key);
std::string str((const char *)result.dptr, result.dsize);