diff options
-rw-r--r-- | win32/mingw.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/win32/mingw.c b/win32/mingw.c index 97bc95d8e..a7540d220 100644 --- a/win32/mingw.c +++ b/win32/mingw.c | |||
@@ -462,9 +462,10 @@ static int has_exec_format(const char *name) | |||
462 | } | 462 | } |
463 | 463 | ||
464 | if (fd < 0) | 464 | if (fd < 0) |
465 | return 0; | 465 | n = open_read_close(name, buf, sizeof(buf)); |
466 | else | ||
467 | n = read_close(fd, buf, sizeof(buf)); | ||
466 | 468 | ||
467 | n = read_close(fd, buf, sizeof(buf)); | ||
468 | if (n < 4) /* Need at least a few bytes and no error */ | 469 | if (n < 4) /* Need at least a few bytes and no error */ |
469 | return 0; | 470 | return 0; |
470 | 471 | ||