XLIFF: fix null approved-attr handling
This commit is contained in:
parent
53de09d151
commit
dbb99ee550
1 changed files with 3 additions and 3 deletions
|
@ -56,11 +56,11 @@ void XLIFFParser::startElement(const char *name, const XMLAttributes &atts)
|
|||
|
||||
_source.clear();
|
||||
_target.clear();
|
||||
std::string as = atts.getValue("approved");
|
||||
if (as.empty()) {
|
||||
const char* ac = atts.getValue("approved");
|
||||
if (!ac || !strcmp(ac, "")) {
|
||||
_approved = false;
|
||||
} else {
|
||||
_approved = simgear::strutils::to_bool(as);
|
||||
_approved = simgear::strutils::to_bool(std::string{ac});
|
||||
}
|
||||
} else if (tag == "group") {
|
||||
_resource = atts.getValue("resname");
|
||||
|
|
Loading…
Add table
Reference in a new issue