1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-30 02:05:13 +01:00

Merge pull request #2597 from ecnepsnai/develop

Fix #2550 Program crashes when executing "exit" command from the console
This commit is contained in:
Ted John
2015-12-30 18:35:20 +00:00

View File

@@ -1045,8 +1045,10 @@ void console_execute_silent(const utf8 *src)
return;
// Aliases for hiding the console
if(strcmp(argv[0],"quit") == 0 || strcmp(argv[0],"exit") == 0)
argv[0]="hide";
if(strcmp(argv[0],"quit") == 0 || strcmp(argv[0],"exit") == 0) {
free(argv[0]);
argv[0] = _strdup("hide");
}
bool validCommand = false;
for (int i = 0; i < countof(console_command_table); i++) {