2
0
aster2013 10 жил өмнө
parent
commit
d3247fccf5

+ 4 - 0
Source/Urho3D/Resource/JSONFile.cpp

@@ -172,7 +172,11 @@ static void ToRapidjsonValue(rapidjson::Value& rapidjsonValue, const JSONValue&
             rapidjsonValue.Reserve(jsonArray.Size(), allocator);
             rapidjsonValue.Reserve(jsonArray.Size(), allocator);
 
 
             for (unsigned i = 0; i < jsonArray.Size(); ++i)
             for (unsigned i = 0; i < jsonArray.Size(); ++i)
+            {
+                rapidjson::Value value;
+                rapidjsonValue.PushBack(value, allocator);
                 ToRapidjsonValue(rapidjsonValue[i], jsonArray[i], allocator);
                 ToRapidjsonValue(rapidjsonValue[i], jsonArray[i], allocator);
+            }
         }
         }
         break;
         break;
 
 

+ 2 - 2
Source/Urho3D/Resource/JSONValue.cpp

@@ -81,8 +81,8 @@ void JSONValue::SetType(JSONValueType valueType)
 
 
 JSONValue& JSONValue::operator =(bool rhs)
 JSONValue& JSONValue::operator =(bool rhs)
 {
 {
-    SetType(JSON_NUMBER);
-    numberValue_ = rhs;
+    SetType(JSON_BOOL);
+    boolValue_ = rhs;
 
 
     return *this;
     return *this;
 }
 }