mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
Core: Fix virtual disc index reading.
Otherwise it thought the newline was part of the path.
This commit is contained in:
1 parent
df8e80d4fb
commit
fada6583c9
1 file changed
+3
@@ -92,6 +92,9 @@ void VirtualDiscFileSystem::LoadFileListIndex() {
|
||||
char linebuf[MAX_LINE_SIZE]{};
|
||||
while (fgets(linebuf, MAX_LINE_SIZE, f)) {
|
||||
std::string line = linebuf;
|
||||
// Strip newline from fgets.
|
||||
if (!line.empty() && line.back() == '\n')
|
||||
line.resize(line.size() - 1);
|
||||
|
||||
// Ignore any UTF-8 BOM.
|
||||
if (line.substr(0, 3) == "\xEF\xBB\xBF") {
|
||||
|
||||
Reference in new issue
Block a user