Fix null characters in chat prompt (old bug)

Sometimes null characters were inserted in chat prompt
Rename "Scripting" bot into "Script" bot.
This commit is contained in:
ORelio 2014-04-10 19:55:16 +02:00
parent b0e4e993ce
commit a543620a80
5 changed files with 23 additions and 14 deletions

View file

@ -60,8 +60,11 @@ namespace MinecraftClient
break;
default:
Console.Write('*');
password += k.KeyChar;
if (k.KeyChar != 0)
{
Console.Write('*');
password += k.KeyChar;
}
break;
}
}
@ -159,7 +162,15 @@ namespace MinecraftClient
}
break;
default:
AddChar(k.KeyChar);
if (k.KeyChar != 0)
AddChar(k.KeyChar);
/*
reading_lock = false;
WriteLine("CHAR: " + ((int)k.KeyChar));
if (!System.IO.File.Exists("debug-chars.txt")) { System.IO.File.Create("debug-chars.txt"); }
System.IO.File.AppendAllText("debug-chars.txt", "'" + k.KeyChar + "' " + ((int)k.KeyChar) + "\r\n");
reading_lock = true;
*/
break;
}
}