Exception upon using down arrow key within command textbox
l33m4n opened this issue · comments
l33m4n commented
If I use the down arrow key I will receive a exception stating "Index was out of range. Must be non negative and less than the size of collection. (Parameter 'index')"
What is interesting about this, is that it does work fine, and the command is cleared when you do this. I just wanted to report the exception.
l33m4n commented
Sorry I forgot to include the actual useful part.
************** Exception Text **************
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
at System.Collections.Generic.List`1.get_Item(Int32 index)
at System.Linq.Enumerable.ElementAt[TSource](IEnumerable`1 source, Int32 index)
at MinecraftService.Client.Forms.MainWindow.cmdTextBox_PreviewKeyDown(Object sender, PreviewKeyDownEventArgs e)
at System.Windows.Forms.Control.PreProcessControlMessageInternal(Control target, Message& msg)
at System.Windows.Forms.Application.ThreadContext.PreTranslateMessage(MSG& msg)
l33m4n commented
After some more testing, I have found this only occurs after using a command. If the client has just been loaded and you arrow down, it will not produce this error.
Tad Tarrant commented
A fix has been merged, thank you @l33m4n!