@@ -886,13 +886,13 @@ restart:
r = Random();
SetDParam(0, r);
GetString(buf1, townnametype);
// Check size and width
if (strlen(buf1) >= 31 || GetStringWidth(buf1) > 130) continue;
if (strlen(buf1) >= 31 || GetStringBoundingBox(buf1).width > 130) continue;
FOR_ALL_TOWNS(t2) {
// We can't just compare the numbers since
// several numbers may map to a single name.
SetDParam(0, t2->index);
GetString(buf2, STR_TOWN);