fix bad ship and building names and descriptions in save.

This commit is contained in:
Enno Rehling 2016-11-11 22:28:22 +01:00
parent 5032d44af4
commit 710811131f
1 changed files with 6 additions and 0 deletions

View File

@ -1699,12 +1699,18 @@ ship *read_ship(struct gamedata *data)
READ_INT(store, &sh->no);
shash(sh);
READ_STR(store, name, sizeof(name));
if (unicode_utf8_trim(name)!=0) {
log_warning("trim ship %s name to '%s'", itoa36(sh->no), name);
}
sh->name = _strdup(name);
if (lomem) {
READ_STR(store, NULL, 0);
}
else {
READ_STR(store, name, sizeof(name));
if (unicode_utf8_trim(name)!=0) {
log_warning("trim ship %s info to '%s'", itoa36(sh->no), name);
}
sh->display = _strdup(name);
}
READ_STR(store, name, sizeof(name));