From 6e9c85791cfe91639ad5eae020e5b56e281de794 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 17 May 2021 13:11:41 +0200 Subject: [PATCH] - pick the proper dot for cutting off the extension in ExtractFileBase. --- src/common/utility/cmdlib.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/common/utility/cmdlib.cpp b/src/common/utility/cmdlib.cpp index 72485011d0..9551cbf42a 100644 --- a/src/common/utility/cmdlib.cpp +++ b/src/common/utility/cmdlib.cpp @@ -331,13 +331,8 @@ FString ExtractFileBase (const char *path, bool include_extension) } #endif - if (!include_extension) + if (!include_extension && (dot = strrchr(src, '.'))) { - dot = src; - while (*dot && *dot != '.') - { - dot++; - } return FString(src, dot - src); } else