Skip to content

Commit

Permalink
explicitly use ANSI version of FindFirstFile()
Browse files Browse the repository at this point in the history
c.f. PR #170
  • Loading branch information
sezero committed Jun 3, 2017
1 parent 1a8443a commit 8586187
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/file_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ void *_WM_BufferFile(const char *filename, uint32_t *size) {
#elif defined(_WIN32)
int buffer_fd;
HANDLE h;
WIN32_FIND_DATA wfd;
WIN32_FIND_DATAA wfd;
#elif defined(__OS2__) || defined(__EMX__)
int buffer_fd;
HDIR h = HDIR_CREATE;
Expand Down Expand Up @@ -186,7 +186,7 @@ void *_WM_BufferFile(const char *filename, uint32_t *size) {
}
*size = f.ff_fsize;
#elif defined(_WIN32)
if ((h = FindFirstFile(buffer_file, &wfd)) == INVALID_HANDLE_VALUE) {
if ((h = FindFirstFileA(buffer_file, &wfd)) == INVALID_HANDLE_VALUE) {
_WM_GLOBAL_ERROR(__FUNCTION__, __LINE__, WM_ERR_STAT, filename, ENOENT);
free(buffer_file);
return NULL;
Expand Down

0 comments on commit 8586187

Please sign in to comment.