Fix if-condition inside load_xml_image()

This commit is contained in:
David Capello 2016-02-18 10:58:22 -03:00
parent 64deb6ed87
commit 237a46588c

View File

@ -38,8 +38,8 @@ ImageRef load_xml_image(const TiXmlElement* imageElem)
{
ImageRef image;
int w, h;
if (!imageElem->QueryIntAttribute("width", &w) == TIXML_SUCCESS ||
!imageElem->QueryIntAttribute("height", &h) == TIXML_SUCCESS ||
if (imageElem->QueryIntAttribute("width", &w) != TIXML_SUCCESS ||
imageElem->QueryIntAttribute("height", &h) != TIXML_SUCCESS ||
w < 0 || w > 9999 ||
h < 0 || h > 9999)
return image;