From 125d8e50a967f8b2958b491f9d51b09f52ed0de9 Mon Sep 17 00:00:00 2001 From: Syoyo Fujita Date: Sat, 9 Nov 2019 20:52:56 +0900 Subject: [PATCH] fopen_s -> fopen in linux(posix) code path. --- tiny_gltf.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) 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;