Merge pull request #1437 from rmitton/sib-version
Added support for SIB models from Silo 2.5pull/1441/head
commit
484f73b179
|
@ -201,7 +201,7 @@ static aiString ReadString(StreamReaderLE* stream, uint32_t numWChars)
|
||||||
//ConvertUTF16toUTF8(&start, end, &dest, limit, lenientConversion);
|
//ConvertUTF16toUTF8(&start, end, &dest, limit, lenientConversion);
|
||||||
//*dest = '\0';
|
//*dest = '\0';
|
||||||
|
|
||||||
str[str.size()-1] = '\0';
|
str[str.size()] = '\0';
|
||||||
// Return the final string.
|
// Return the final string.
|
||||||
aiString result = aiString((const char *)&str[0]);
|
aiString result = aiString((const char *)&str[0]);
|
||||||
//delete[] str;
|
//delete[] str;
|
||||||
|
@ -827,7 +827,7 @@ static void ReadInstance(SIB* sib, StreamReaderLE* stream)
|
||||||
static void CheckVersion(StreamReaderLE* stream)
|
static void CheckVersion(StreamReaderLE* stream)
|
||||||
{
|
{
|
||||||
uint32_t version = stream->GetU4();
|
uint32_t version = stream->GetU4();
|
||||||
if ( version != 1 ) {
|
if ( version < 1 || version > 2 ) {
|
||||||
throw DeadlyImportError( "SIB: Unsupported file version." );
|
throw DeadlyImportError( "SIB: Unsupported file version." );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue