Skip to content

Commit 36c08a0

Browse files
committed
Merge branch 'master' of https://github.com/assimp/assimp
2 parents 52f3cd0 + c5ba04c commit 36c08a0

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

code/XFileParser.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,9 @@ XFileParser::XFileParser( const std::vector<char>& pBuffer)
136136
ThrowException( boost::str( boost::format( "Unknown float size %1% specified in xfile header.")
137137
% mBinaryFloatSize));
138138

139+
// The x format specifies size in bits, but we work in bytes
140+
mBinaryFloatSize /= 8;
141+
139142
P += 16;
140143

141144
// If this is a compressed X file, apply the inflate algorithm to it

code/XFileParser.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ class XFileParser
144144
protected:
145145
unsigned int mMajorVersion, mMinorVersion; ///< version numbers
146146
bool mIsBinaryFormat; ///< true if the file is in binary, false if it's in text form
147-
unsigned int mBinaryFloatSize; ///< float size, either 32 or 64 bits
147+
unsigned int mBinaryFloatSize; ///< float size in bytes, either 4 or 8
148148
// counter for number arrays in binary format
149149
unsigned int mBinaryNumCount;
150150

0 commit comments

Comments
 (0)