mirror of
https://git.mirrors.martin98.com/https://github.com/syoyo/tinygltf.git
synced 2025-08-11 13:59:01 +08:00
Merge pull request #38 from o-micron/patch-2
Fix LoadImageData return value when error occurs
This commit is contained in:
commit
c7ae1a3e76
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user