mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 13:30:02 +00:00
Workaround a strange zlib crash in debug mode only.
This commit is contained in:
parent
21cdcb5c0d
commit
8a20b28bb6
@ -588,7 +588,12 @@ int ZEXPORT gzclose_r(file)
|
||||
err = state->err == Z_BUF_ERROR ? Z_BUF_ERROR : Z_OK;
|
||||
gz_error(state, Z_OK, NULL);
|
||||
free(state->path);
|
||||
#ifdef _WIN32
|
||||
// Strange crash in debug-only when using close() under MSVC 2010.
|
||||
ret = _close(state->fd);
|
||||
#else
|
||||
ret = close(state->fd);
|
||||
#endif
|
||||
free(state);
|
||||
return ret ? Z_ERRNO : err;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user