File diff r12621:386add954b41 → r12622:202e83a6cee7
src/engine.cpp
Show inline comments
 
@@ -744,13 +744,13 @@ CommandCost CmdRenameEngine(TileIndex ti
 
	if (e == NULL) return CMD_ERROR;
 

	
 
	bool reset = StrEmpty(text);
 

	
 
	if (!reset) {
 
		if (strlen(text) >= MAX_LENGTH_ENGINE_NAME_BYTES) return CMD_ERROR;
 
		if (!IsUniqueEngineName(text)) return_cmd_error(STR_NAME_MUST_BE_UNIQUE);
 
		if (!IsUniqueEngineName(text)) return_cmd_error(STR_ERROR_NAME_MUST_BE_UNIQUE);
 
	}
 

	
 
	if (flags & DC_EXEC) {
 
		free(e->name);
 

	
 
		if (reset) {