From decda04ffdbe4803e3d346b3784403b68faba82e Mon Sep 17 00:00:00 2001 From: Ron Yorston Date: Tue, 27 Feb 2018 12:45:19 +0000 Subject: win32: fix code to check for file extensions The has_win_suffix function didn't check that the extension started with a '.'. As a result the shell was unable to execute cmd.exe. --- win32/mingw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'win32') diff --git a/win32/mingw.c b/win32/mingw.c index 713778ff1..22e62232d 100644 --- a/win32/mingw.c +++ b/win32/mingw.c @@ -1013,7 +1013,7 @@ static int has_win_suffix(const char *name, int start) { int i, len = strlen(name); - if (len > 4) { + if (len > 4 && name[len-4] == '.') { for (i=start; i<4; ++i) { if (!strcasecmp(name+len-3, win_suffix[i])) { return 1; -- cgit v1.2.3-55-g6feb