So an alle Pro's:
Mein Emu kackt bei den Umlauten inklusive ß ab.
Error Logfile:
Code
System.ArgumentOutOfRangeException: Der Index und die L?nge m?ssen sich auf eine Position in der Zeichenfolge beziehen.
Parametername: length
bei System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy)
bei System.String.Substring(Int32 startIndex, Int32 length)
bei Holo.Virtual.Users.virtualUser.dataArrival(IAsyncResult iAr) in C:\Users\Josh\Desktop\TkDbP\Source\Virtual\Users\virtualUser.cs:Zeile 254.
virtualUser.cs:Zeile 254:
Code
private void dataArrival(IAsyncResult iAr)
{
try
{
int bytesReceived = 0;
try
{
bytesReceived = connectionSocket.EndReceive(iAr);
} catch { }
string connectionData = System.Text.Encoding.Default.GetString(dataBuffer, 0, bytesReceived);
//Out.WriteSpecialLine(connectionData.Replace("\r", "{13}"), Out.logFlags.MehAction, ConsoleColor.White, ConsoleColor.DarkCyan, "> [" + Thread.GetDomainID() + "]", 2, ConsoleColor.Cyan);
if (connectionData == "" || connectionData.Contains("\x01") || connectionData.Contains("\x02") || connectionData.Contains("\x05") || connectionData.Contains("\x09"))
{
Disconnect();
return;
}
while (connectionData != "")
{
254------> int v = Encoding.decodeB64(connectionData.Substring(1, 2));
processPacket(connectionData.Substring(3, v));
connectionData = connectionData.Substring(v + 3);
}
try
{
connectionSocket.BeginReceive(dataBuffer, 0, dataBuffer.Length, SocketFlags.None, new AsyncCallback(dataArrival), null);
}
catch { Disconnect(); }
}
catch (Exception e) { Out.WriteDCError(e.ToString()); sendData("BK Error! - Please contact Player Support."); }
}
Alles anzeigen
Wie fixt man es?