From 272653f8baea43c0a53ff8c12ab4699669c2961d Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Fri, 12 Jun 2015 18:05:56 +0200 Subject: [PATCH] fixing sea serpents with empty names, again. https://bugs.eressea.de/view.php?id=2057 --- src/kernel/save.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/kernel/save.c b/src/kernel/save.c index 25169d4af..fdfe9aad9 100644 --- a/src/kernel/save.c +++ b/src/kernel/save.c @@ -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);