Fixed console command history incorrect index for going down through history

This commit is contained in:
2019-08-08 20:28:35 -05:00
parent a82e71cea7
commit 9ab019f1bc

View File

@@ -80,7 +80,7 @@ class IMICFPS
when Gosu::KbDown
@command_history_index += 1
if @command_history_index > @command_history.size - 1
@command_history_index = @command_history.size - 1
@command_history_index = @command_history.size
@text_input.text = ""
else
@text_input.text = @command_history[@command_history_index]