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 568f05fec9
commit d492efc38a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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) {