From 2c5851be34e9ec9998205cbf332b719971aeee69 Mon Sep 17 00:00:00 2001 From: cxl Date: Thu, 19 Apr 2012 08:58:43 +0000 Subject: [PATCH] *Core: Fix in Value::Serialize git-svn-id: svn://ultimatepp.org/upp/trunk@4820 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/Core/Value.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/uppsrc/Core/Value.cpp b/uppsrc/Core/Value.cpp index 7e284087a..98a429959 100644 --- a/uppsrc/Core/Value.cpp +++ b/uppsrc/Core/Value.cpp @@ -279,11 +279,14 @@ INITBLOCK { void Value::Serialize(Stream& s) { RegisterStd(); - dword type; + int type; if(s.IsLoading()) { s / type; Free(); int st = type == VOID_V ? VOIDV : type == STRING_V ? STRING : type; + if(st < 0) + s.LoadError(); + else if(st == STRING) s % data; else