From f04eeaea876865d78e24532b5f53a6a77826258a Mon Sep 17 00:00:00 2001 From: erg Date: Thu, 12 Oct 2006 23:10:20 +0000 Subject: [PATCH] Fix Windows code to only remove .exe if it exists. Apparently, versions can now have argv[0] with no trailing .exe. --- lib/common/input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/common/input.c b/lib/common/input.c index c0b5beac9..9ed8564b8 100644 --- a/lib/common/input.c +++ b/lib/common/input.c @@ -134,7 +134,7 @@ static char* dotneato_basename (char* path) */ { char* dotp = strrchr (s, '.'); - if (dotp) *dotp = '\0'; + if (dotp && !strcmp(dotp+1,"exe")) *dotp = '\0'; } #endif while (*s) s++; s--; -- 2.40.0