mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-21 20:10:17 +00:00
This commit is contained in:
parent
25cca8c58f
commit
590cb1130c
@ -4,7 +4,7 @@
|
||||
namespace pkpy{
|
||||
|
||||
static FILE* io_fopen(const char* name, const char* mode){
|
||||
#if _WIN32
|
||||
#if _MSC_VER
|
||||
FILE* fp;
|
||||
errno_t err = fopen_s(&fp, name, mode);
|
||||
if(err != 0) return nullptr;
|
||||
@ -15,7 +15,7 @@ static FILE* io_fopen(const char* name, const char* mode){
|
||||
}
|
||||
|
||||
static size_t io_fread(void* buffer, size_t size, size_t count, FILE* fp){
|
||||
#if _WIN32
|
||||
#if _MSC_VER
|
||||
return fread_s(buffer, std::numeric_limits<size_t>::max(), size, count, fp);
|
||||
#else
|
||||
return fread(buffer, size, count, fp);
|
||||
|
Loading…
x
Reference in New Issue
Block a user