forked from github/server
Safety-Check, in case region names are too long despite all the checks.
This commit is contained in:
parent
dde02d16e7
commit
2b0a40ab22
|
@ -962,9 +962,12 @@ f_regionid(const region * r, const faction * f)
|
|||
else {
|
||||
pl = getplane(r);
|
||||
if(pl && fval(pl,PFL_NOCOORDS)) {
|
||||
sprintf(buf, "%s", rname(r, f->locale));
|
||||
strncpy(buf, rname(r, f->locale), NAMESIZE);
|
||||
buf[NAMESIZE]=0;
|
||||
} else {
|
||||
sprintf(buf, "%s (%d,%d%s%s)", rname(r, f->locale), region_x(r,f), region_y(r,f), pl?",":"", pl?pl->name:"");
|
||||
strncpy(buf, rname(r, f->locale), NAMESIZE);
|
||||
buf[NAMESIZE]=0;
|
||||
sprintf(buf+strlen(buf), " (%d,%d%s%s)", region_x(r,f), region_y(r,f), pl?",":"", pl?pl->name:"");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue