浏览代码

Merge pull request #229 from lukaspj/Fix-Taml-JSON

Taml - JSON fix
Mike Lilligreen 11 年之前
父节点
当前提交
c485619ebe
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      engine/source/persistence/taml/json/tamlJSONReader.cc

+ 2 - 1
engine/source/persistence/taml/json/tamlJSONReader.cc

@@ -45,6 +45,7 @@ SimObject* TamlJSONReader::read( FileStream& stream )
         Con::warnf("TamlJSONReader::read() -  Could not load Taml JSON file from stream.");
         return NULL;
     }
+    jsonText[streamSize] = NULL;
 
     // Create JSON document.
     rapidjson::Document document;
@@ -662,7 +663,7 @@ inline const char* TamlJSONReader::getTamlObjectName( const rapidjson::Value& va
         StringTableEntry attributeName = StringTable->insert( memberItr->name.GetString() );
 
         // Skip if not the correct attribute.
-        if ( attributeName != tamlRefToIdName )
+        if ( attributeName != tamlNamedObjectName )
             continue;
 
         // Is the value an integer?