mirror of
https://github.com/syoyo/tinygltf.git
synced 2026-09-17 07:44:34 +00:00
Merge pull request #38 from o-micron/patch-2
Fix LoadImageData return value when error occurs
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user