Browse Source

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

Taml - JSON fix
Mike Lilligreen 11 years ago
parent
commit
c485619ebe
1 changed files with 2 additions and 1 deletions
  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?