mirror of
https://git.mirrors.martin98.com/https://github.com/syoyo/tinygltf.git
synced 2025-08-18 04:25:53 +08:00
fopen_s -> fopen in linux(posix) code path.
This commit is contained in:
parent
45cac78709
commit
125d8e50a9
@ -1415,6 +1415,7 @@ class TinyGLTF {
|
|||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
//#include <cassert>
|
//#include <cassert>
|
||||||
#ifndef TINYGLTF_NO_FS
|
#ifndef TINYGLTF_NO_FS
|
||||||
|
#include <cstdio>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#endif
|
#endif
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
@ -2414,11 +2415,7 @@ bool FileExists(const std::string &abs_filename, void *) {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#else
|
#else
|
||||||
FILE *fp = nullptr;
|
FILE *fp = fopen(abs_filename.c_str(), "rb");
|
||||||
errno_t err = fopen_s(&fp, abs_filename.c_str(), "rb");
|
|
||||||
if (err != 0) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
if (fp) {
|
if (fp) {
|
||||||
ret = true;
|
ret = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user