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.
pull/395/head
Gargaj 2014-09-26 01:29:23 +02:00
parent a5afbcf29c
commit 397989e169
1 changed files with 1 additions and 0 deletions

View File

@ -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;
}