From eac2aed175ad07180ff42fc3910e6998729784f6 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sat, 31 Oct 2020 14:58:23 +0800 Subject: [PATCH] Fix serial --- ryzom/client/src/interface_v3/group_compas.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/ryzom/client/src/interface_v3/group_compas.cpp b/ryzom/client/src/interface_v3/group_compas.cpp index bee955ba4..a78c94681 100644 --- a/ryzom/client/src/interface_v3/group_compas.cpp +++ b/ryzom/client/src/interface_v3/group_compas.cpp @@ -75,11 +75,20 @@ void CCompassTarget::serial(NLMISC::IStream &f) } } f.serialCheck(NELID("CTAR")); - f.serialVersion(0); + sint version = f.serialVersion(1); f.serial(Pos); // for the name, try to save a string identifier if possible, because language may be changed between // save & reload - f.serial(Name); + if (version < 1) + { + ucstring name; // Serial old version + f.serial(name); + Name = name.toUtf8(); + } + else + { + f.serial(Name); + } std::string language = toLower(ClientCfg.LanguageCode); f.serial(language); f.serialEnum(_Type);