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