Bug #1738: expr_bool.y returns -1 if the type does not match

This commit is contained in:
Carlos Martín committed 2013-01-29 14:57:51 +01:00
1 parent 591123265c
commit 4c27fd2fea
1 file changed
+14
+14
View File
@@ -230,6 +230,13 @@ int get_xml_attribute(ObjectXML * oxml, const char* attr, int& val)
istringstream iss(results[0]);
iss >> val;
if (iss.fail())
{
val = 0;
return -1;
}
return 0;
}
@@ -276,6 +283,13 @@ int get_xml_attribute(ObjectXML * oxml, const char* attr, float& val)
istringstream iss(results[0]);
iss >> val;
if (iss.fail())
{
val = 0;
return -1;
}
return 0;
}