fixed loading songs (TryReadInt)

This commit is contained in:
Alexander Eckart committed 2013-06-06 21:34:06 +02:00
1 parent ad873fbd58
commit ca5fc16332
1 file changed
+6 -3
+6 -3
View File
@@ -69,13 +69,16 @@ namespace VocaluxeLib
public static int TryReadInt(StreamReader sr) public static int TryReadInt(StreamReader sr)
{ {
string value = String.Empty; string value = String.Empty;
try try
{ {
int tmp = sr.Peek(); int tmp = sr.Peek();
//Check for ' ', ?, ?, \n, \r //Check for ' ', ?, ?, \n, \r, E
while (tmp != 32 && tmp != 19 && tmp != 16 && tmp != 13 && tmp != 10) while (tmp != 32 && tmp != 19 && tmp != 16 && tmp != 13 && tmp != 10 && tmp != 69)
{ {
if (sr.EndOfStream)
break;
char chr = (char)sr.Read(); char chr = (char)sr.Read();
value += chr.ToString(); value += chr.ToString();
tmp = sr.Peek(); tmp = sr.Peek();