Codechange: Czech town names unconditionally removed the last codepoint in _name_czech_adj; already do this in the source table.

This commit is contained in:
frosch
2025-04-02 13:11:51 +02:00
committed by frosch
parent 86bb30acbe
commit d8333fe3d7
3 changed files with 49 additions and 62 deletions

View File

@@ -702,11 +702,7 @@ static void MakeCzechTownName(StringBuilder &builder, uint32_t seed)
builder += _name_czech_adj[prefix].name;
size_t endpos = builder.CurrentIndex() - 1;
/* Find the first character in a UTF-8 sequence */
while (GB(builder[endpos], 6, 2) == 2) endpos--;
builder.RemoveElementsFromBack(builder.CurrentIndex() - endpos);
size_t endpos = builder.CurrentIndex();
if (gender == CZG_SMASC && pattern == CZP_PRIVL) {
/* -ovX -> -uv */
builder[endpos - 2] = 'u';