Merge pull request #11012 from pchote/fix-missing-music

Add missing music tracks to global mix database.
This commit is contained in:
Oliver Brakmann
2016-04-03 13:42:17 +02:00
2 changed files with 6 additions and 7 deletions

View File

@@ -20,22 +20,21 @@ namespace OpenRA.FileFormats
public XccGlobalDatabase(Stream s)
{
var entries = new List<string>();
var reader = new BinaryReader(s);
while (reader.PeekChar() > -1)
while (s.Peek() > -1)
{
var count = reader.ReadInt32();
var count = s.ReadInt32();
for (var i = 0; i < count; i++)
{
var chars = new List<char>();
char c;
byte c;
// Read filename
while ((c = reader.ReadChar()) != 0)
chars.Add(c);
while ((c = s.ReadUInt8()) != 0)
chars.Add((char)c);
entries.Add(new string(chars.ToArray()));
// Skip comment
while ((c = reader.ReadChar()) != 0) { }
while ((c = s.ReadUInt8()) != 0) { }
}
}

Binary file not shown.