Fix return value when error occurs

This commit is contained in:
Omar C. F
2018-02-10 09:50:35 +02:00
committed by GitHub
parent 5a94d3e4f5
commit 3cec231409

View File

@@ -1176,7 +1176,7 @@ static bool LoadImageData(Image *image, std::string *err, int req_width,
if (err) {
(*err) += "Unknown image format.\n";
}
return true;
return false;
}
if (w < 1 || h < 1) {
@@ -1184,7 +1184,7 @@ static bool LoadImageData(Image *image, std::string *err, int req_width,
if (err) {
(*err) += "Invalid image data.\n";
}
return true;
return false;
}
if (req_width > 0) {