diff options
Diffstat (limited to 'libbb/executable.c')
-rw-r--r-- | libbb/executable.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/libbb/executable.c b/libbb/executable.c index 770aedc0c..606bec986 100644 --- a/libbb/executable.c +++ b/libbb/executable.c | |||
@@ -57,10 +57,12 @@ char* FAST_FUNC find_executable(const char *filename, char **PATHp) | |||
57 | ); | 57 | ); |
58 | #if ENABLE_PLATFORM_MINGW32 | 58 | #if ENABLE_PLATFORM_MINGW32 |
59 | { | 59 | { |
60 | char *w = alloc_ext_space(p); | 60 | char *w = file_is_win32_exe(p); |
61 | ex = add_win32_extension(w) || file_is_executable(w); | 61 | ex = w != NULL; |
62 | free(p); | 62 | if (ex) { |
63 | p = w; | 63 | free(p); |
64 | p = w; | ||
65 | } | ||
64 | } | 66 | } |
65 | #else | 67 | #else |
66 | ex = file_is_executable(p); | 68 | ex = file_is_executable(p); |