twmsg: fix notfound detection

Change-Id: Ie95fdfaed7011994ac11202d070edeb95032b805
This commit is contained in:
Ethan Yonker
2015-12-20 22:50:23 -06:00
parent 56db1c4e7f
commit 9ce9591cfb
+1 -1
View File
@@ -33,7 +33,7 @@ std::string Message::GetFormatString(const std::string& name) const
resname = name.substr(0, pos);
std::string formatstr = resourceLookup(resname);
bool notfound = formatstr.empty() || formatstr[0] == '['; // HACK: TODO: integrate this with resource-not-found logic
bool notfound = formatstr.empty() || formatstr.substr(0, 2) == "{@"; // HACK: TODO: integrate this with resource-not-found logic
if (notfound && pos != std::string::npos)
// resource not found - use the default format string specified after "="
formatstr = name.substr(pos + 1);