From 3a3baa54facbca1a772b90b34ae89650829caf5d Mon Sep 17 00:00:00 2001 From: blinry Date: Mon, 2 Nov 2020 15:39:12 +0100 Subject: [PATCH] When the history contains an entry like "git ", don't crash --- scenes/terminal.gd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scenes/terminal.gd b/scenes/terminal.gd index cc927f5..9fb6bbc 100644 --- a/scenes/terminal.gd +++ b/scenes/terminal.gd @@ -138,7 +138,7 @@ func relevant_subcommands(): var result = {} for h in game.state["history"]: var parts = Array(h.split(" ")) - if parts[0] == "git": + if parts.size() >= 2 and parts[0] == "git": var subcommand = parts[1] if git_commands.has(subcommand): if not result.has(subcommand):