mirror of
https://git.mirrors.martin98.com/https://github.com/syoyo/tinygltf.git
synced 2025-08-11 13:09:04 +08:00
Fix return value when error occurs
This commit is contained in:
parent
568f05fec9
commit
d492efc38a
@ -1176,7 +1176,7 @@ static bool LoadImageData(Image *image, std::string *err, int req_width,
|
|||||||
if (err) {
|
if (err) {
|
||||||
(*err) += "Unknown image format.\n";
|
(*err) += "Unknown image format.\n";
|
||||||
}
|
}
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (w < 1 || h < 1) {
|
if (w < 1 || h < 1) {
|
||||||
@ -1184,7 +1184,7 @@ static bool LoadImageData(Image *image, std::string *err, int req_width,
|
|||||||
if (err) {
|
if (err) {
|
||||||
(*err) += "Invalid image data.\n";
|
(*err) += "Invalid image data.\n";
|
||||||
}
|
}
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (req_width > 0) {
|
if (req_width > 0) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user