Merge pull request #1060 from assimp/issue_1059

Issue 1059
pull/1062/head
Kim Kulling 2016-11-08 21:31:47 +01:00 committed by GitHub
commit 1d08c9e2e2
2 changed files with 2 additions and 2 deletions

View File

@ -230,8 +230,6 @@ template<class T>
inline inline
bool IOStreamBuffer<T>::getNextLine( std::vector<T> &buffer ) { bool IOStreamBuffer<T>::getNextLine( std::vector<T> &buffer ) {
buffer.resize( m_cacheSize ); buffer.resize( m_cacheSize );
::memset( &buffer[ 0 ], '\n', m_cacheSize );
if ( m_cachePos == m_cacheSize || 0 == m_filePos ) { if ( m_cachePos == m_cacheSize || 0 == m_filePos ) {
if ( !readNextBlock() ) { if ( !readNextBlock() ) {
return false; return false;
@ -248,6 +246,7 @@ bool IOStreamBuffer<T>::getNextLine( std::vector<T> &buffer ) {
} }
} }
} }
buffer[ i ] = '\n';
m_cachePos++; m_cachePos++;
return true; return true;

View File

@ -43,6 +43,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <assimp/types.h> #include <assimp/types.h>
using namespace Assimp; using namespace Assimp;
class utTypes : public ::testing::Test { class utTypes : public ::testing::Test {
// empty // empty
}; };