summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorCraig Carnell <1188869+cscd98@users.noreply.github.com>2026-07-11 10:53:59 +0100
committerCraig Carnell <1188869+cscd98@users.noreply.github.com>2026-07-12 13:42:22 +0100
commit4b55c26cdbfbdc6434dbbbf78fbe89650262e5b5 (patch)
treeb64cf4253d27e46b2dfdf5b33e619021f2a3cc83 /Source
parent6de526c684ee6dd8b6fc3447dae858ae480ccbb5 (diff)
m3u: normalize line endings except win32
Diffstat (limited to 'Source')
-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);