forked from github/server
Merge pull request #174 from badgerman/develop
fixing sea serpent names
This commit is contained in:
commit
4ea14398e8
|
@ -1602,9 +1602,9 @@ int readgame(const char *filename, int backup)
|
|||
unit *u = read_unit(&gdata);
|
||||
sc_mage *mage;
|
||||
|
||||
if (gdata.version < AUTO_RACENAME_VERSION) {
|
||||
if (gdata.version < JSON_REPORT_VERSION) {
|
||||
if (u->_name && fval(u->faction, FFL_NPC)) {
|
||||
if (unit_name_equals_race(u)) {
|
||||
if (!u->_name[0] || unit_name_equals_race(u)) {
|
||||
unit_setname(u, NULL);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1649,7 +1649,7 @@ const char *unit_getname(const unit * u)
|
|||
void unit_setname(unit * u, const char *name)
|
||||
{
|
||||
free(u->_name);
|
||||
if (name)
|
||||
if (name && name[0])
|
||||
u->_name = _strdup(name);
|
||||
else
|
||||
u->_name = NULL;
|
||||
|
|
Loading…
Reference in New Issue