diff --git a/tiny_gltf.h b/tiny_gltf.h index d327b1b..e84725a 100644 --- a/tiny_gltf.h +++ b/tiny_gltf.h @@ -1415,6 +1415,7 @@ class TinyGLTF { #include //#include #ifndef TINYGLTF_NO_FS +#include #include #endif #include @@ -2414,11 +2415,7 @@ bool FileExists(const std::string &abs_filename, void *) { #endif #else - FILE *fp = nullptr; - errno_t err = fopen_s(&fp, abs_filename.c_str(), "rb"); - if (err != 0) { - return false; - } + FILE *fp = fopen(abs_filename.c_str(), "rb"); #endif if (fp) { ret = true;