From d492efc38ab77f231732effb6b24e0f76831a962 Mon Sep 17 00:00:00 2001 From: "Omar C. F" Date: Sat, 10 Feb 2018 09:50:35 +0200 Subject: [PATCH] Fix return value when error occurs --- tiny_gltf.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tiny_gltf.h b/tiny_gltf.h index 70ec771..2bec32c 100644 --- a/tiny_gltf.h +++ b/tiny_gltf.h @@ -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) {