From 397989e1699fe1607d20a8e3acc53381a5c172ff Mon Sep 17 00:00:00 2001 From: Gargaj Date: Fri, 26 Sep 2014 01:29:23 +0200 Subject: [PATCH] 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. --- code/AssbinLoader.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/code/AssbinLoader.cpp b/code/AssbinLoader.cpp index 65299f577..bb73e10b3 100644 --- a/code/AssbinLoader.cpp +++ b/code/AssbinLoader.cpp @@ -138,6 +138,7 @@ aiString Read(IOStream * stream) aiString s; stream->Read(&s.length,4,1); stream->Read(s.data,s.length,1); + s.data[s.length] = 0; return s; }