fixing sea serpents with empty names, again. https://bugs.eressea.de/view.php?id=2057

This commit is contained in:
Enno Rehling 2015-06-12 18:05:56 +02:00
parent 6306ed754b
commit 272653f8ba
1 changed files with 2 additions and 2 deletions

View File

@ -618,13 +618,13 @@ unit *read_unit(struct gamedata *data)
}
READ_STR(data->store, obuf, sizeof(obuf));
u->_name = _strdup(obuf);
u->_name = obuf[0] ? _strdup(obuf) : 0;
if (lomem) {
READ_STR(data->store, NULL, 0);
}
else {
READ_STR(data->store, obuf, sizeof(obuf));
u->display = _strdup(obuf);
u->display = obuf[0] ? _strdup(obuf) : 0;
}
READ_INT(data->store, &number);
set_number(u, number);