Browse Source

Null-terminate string

In theory it shouldn't be necessary since the length is specified but there are parts like https://github.com/assimp/assimp/blob/master/code/MaterialSystem.cpp#L74 that depend on it.
Gargaj 11 years ago
parent
commit
397989e169
1 changed files with 1 additions and 0 deletions
  1. 1 0
      code/AssbinLoader.cpp

+ 1 - 0
code/AssbinLoader.cpp

@@ -138,6 +138,7 @@ aiString Read<aiString>(IOStream * stream)
 	aiString s;
 	stream->Read(&s.length,4,1);
 	stream->Read(s.data,s.length,1);
+	s.data[s.length] = 0;
 	return s;
 }