summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorAdmiral H. Curtiss <pikachu025@gmail.com>2026-07-14 19:14:59 +0200
committerGitHub <noreply@github.com>2026-07-14 19:14:59 +0200
commitfee15d96ad094f3a91a1b8074f8d1a113d7d55c2 (patch)
tree8e40bb059647f3dde6d25073ec1c86f52161e0c1 /Source/Core
parent1b67ed71f40cf7b7afcac68bda08a52d8d44f164 (diff)
parent4b55c26cdbfbdc6434dbbbf78fbe89650262e5b5 (diff)
Merge pull request #14719 from cscd98/m3u-fix
m3u: normalize line endings except win32
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Core/Boot/Boot.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/Core/Core/Boot/Boot.cpp b/Source/Core/Core/Boot/Boot.cpp
index 2ddadfec72..e6ce8accfd 100644
--- a/Source/Core/Core/Boot/Boot.cpp
+++ b/Source/Core/Core/Boot/Boot.cpp
@@ -76,6 +76,11 @@ static std::vector<std::string> ReadM3UFile(const std::string& m3u_path,
// This is the UTF-8 representation of U+FEFF.
constexpr std::string_view utf8_bom = "\xEF\xBB\xBF";
+#ifndef _WIN32
+ if (line.ends_with('\r'))
+ line.pop_back();
+#endif
+
if (line.starts_with(utf8_bom))
{
WARN_LOG_FMT(BOOT, "UTF-8 BOM in file: {}", m3u_path);