diff --git a/tiny_gltf.h b/tiny_gltf.h index fb8070d..d00be44 100644 --- a/tiny_gltf.h +++ b/tiny_gltf.h @@ -1257,8 +1257,8 @@ static bool LoadExternalFile(std::vector *out, std::string *err, std::string filepath = FindFile(paths, filename, fs); if (filepath.empty() || filename.empty()) { - if (warn) { - (*warn) += "File not found : " + filename + "\n"; + if (err) { + (*err) += "File not found : " + filename + "\n"; } return false; }