mirror of
https://github.com/QuasarApp/zip.git
synced 2025-04-29 13:54:35 +00:00
Replace _wfopen_s by _wfopen, _wfreopen_s by _wfreopen (#176)
This commit is contained in:
parent
54af749c22
commit
f72dce22bd
13
src/miniz.h
13
src/miniz.h
@ -4125,11 +4125,10 @@ static wchar_t *str2wstr(const char *str) {
|
||||
}
|
||||
|
||||
static FILE *mz_fopen(const char *pFilename, const char *pMode) {
|
||||
FILE *pFile = NULL;
|
||||
|
||||
wchar_t *wFilename = str2wstr(pFilename);
|
||||
wchar_t *wMode = str2wstr(pMode);
|
||||
_wfopen_s(&pFile, wFilename, wMode);
|
||||
FILE *pFile = _wfopen(wFilename, wMode);
|
||||
|
||||
free(wFilename);
|
||||
free(wMode);
|
||||
|
||||
@ -4137,17 +4136,13 @@ static FILE *mz_fopen(const char *pFilename, const char *pMode) {
|
||||
}
|
||||
|
||||
static FILE *mz_freopen(const char *pPath, const char *pMode, FILE *pStream) {
|
||||
FILE *pFile = NULL;
|
||||
|
||||
wchar_t *wPath = str2wstr(pPath);
|
||||
wchar_t *wMode = str2wstr(pMode);
|
||||
int res = _wfreopen_s(&pFile, wPath, wMode, pStream);
|
||||
FILE *pFile = _wfreopen(wPath, wMode, pStream);
|
||||
|
||||
free(wPath);
|
||||
free(wMode);
|
||||
|
||||
if (res)
|
||||
return NULL;
|
||||
|
||||
return pFile;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user