Changeset - r28396:ef195b601c72
[Not reviewed]
master
0 1 0
Peter Nelson - 4 months ago 2024-01-04 23:10:54
peter1138@openttd.org
Fix: Pass townnameparts as parameter when testing townname based companyname. (#11685)

Length of returned string could vary and pass/fail the length check with a different
string than the final selection.
1 file changed with 1 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/company_cmd.cpp
Show inline comments
 
@@ -374,6 +374,7 @@ verify_name:;
 
			if (cc->name_1 == str && cc->name_2 == strp) goto bad_town_name;
 
		}
 

	
 
		SetDParam(0, strp);
 
		name = GetString(str);
 
		if (Utf8StringLength(name) >= MAX_LENGTH_COMPANY_NAME_CHARS) goto bad_town_name;
 

	
0 comments (0 inline, 0 general)