From 7f42448be7819db0499de6e1226bcf8a5d4d9abc Mon Sep 17 00:00:00 2001 From: cxl Date: Sat, 5 Aug 2017 14:02:08 +0000 Subject: [PATCH] Core: Fix in RegisterGlobalSerialize git-svn-id: svn://ultimatepp.org/upp/trunk@11291 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/Core/Util.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/uppsrc/Core/Util.cpp b/uppsrc/Core/Util.cpp index 7124051b4..8fe6de889 100644 --- a/uppsrc/Core/Util.cpp +++ b/uppsrc/Core/Util.cpp @@ -699,8 +699,19 @@ void SerializeGlobalConfigs(Stream& s) int q = sGCfg().Find(name); if(q >= 0) { int w = sGSerialize().Find(name); - if(w >= 0) - sGSerialize()[w](s); + if(w >= 0) { + String h; + if(s.IsStoring()) { + StringStream ss; + sGSerialize()[w](ss); + h = ss; + } + s % h; + if(s.IsLoading()) { + StringStream ss(h); + sGSerialize()[w](ss); + } + } else s % sGCfg()[q]; }