Browse Source

Minor fixed.

aster2013 10 years ago
parent
commit
d3247fccf5
2 changed files with 6 additions and 2 deletions
  1. 4 0
      Source/Urho3D/Resource/JSONFile.cpp
  2. 2 2
      Source/Urho3D/Resource/JSONValue.cpp

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

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

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

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