mirror of
https://github.com/nothings/stb
synced 2024-12-16 12:52:34 +03:00
Don't truncate pointers to 4 bytes on 64-bit
This commit is contained in:
parent
b639b6a468
commit
0fbc8bec6f
13
stb.h
13
stb.h
@ -5831,14 +5831,19 @@ static char **readdir_raw(char *dir, int return_subdirs, char *mask)
|
|||||||
{
|
{
|
||||||
char **results = NULL;
|
char **results = NULL;
|
||||||
char buffer[512], with_slash[512];
|
char buffer[512], with_slash[512];
|
||||||
int n;
|
size_t n;
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
stb__wchar *ws;
|
stb__wchar *ws;
|
||||||
struct _wfinddata_t data;
|
struct _wfinddata_t data;
|
||||||
|
#ifdef _WIN64
|
||||||
|
const intptr_t none = -1;
|
||||||
|
intptr_t z;
|
||||||
|
#else
|
||||||
const long none = -1;
|
const long none = -1;
|
||||||
long z;
|
long z;
|
||||||
#else
|
#endif
|
||||||
|
#else // !_MSC_VER
|
||||||
const DIR *none = NULL;
|
const DIR *none = NULL;
|
||||||
DIR *z;
|
DIR *z;
|
||||||
#endif
|
#endif
|
||||||
@ -6812,7 +6817,11 @@ static void stb__dirtree_scandir(char *path, time_t last_time, stb_dirtree *acti
|
|||||||
int n;
|
int n;
|
||||||
|
|
||||||
struct _wfinddata_t c_file;
|
struct _wfinddata_t c_file;
|
||||||
|
#ifdef STB_PTR64
|
||||||
|
intptr_t hFile;
|
||||||
|
#else
|
||||||
long hFile;
|
long hFile;
|
||||||
|
#endif
|
||||||
stb__wchar full_path[1024];
|
stb__wchar full_path[1024];
|
||||||
int has_slash;
|
int has_slash;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user