Skip to content

Commit

Permalink
Merge pull request #2326 from MalcolmTyrrell/topic/Bug2034_typeCodeC
Browse files Browse the repository at this point in the history
Fix for FBX binary tokenization of arrays of type 'c'
  • Loading branch information
kimkulling committed Feb 8, 2019
2 parents 2f69e49 + 4621bde commit fadfaf8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions code/FBXBinaryTokenizer.cpp
Expand Up @@ -83,7 +83,7 @@ namespace FBX {
// e_unknown_21 = 1 << 21,
// e_unknown_22 = 1 << 22,
// e_unknown_23 = 1 << 23,
// e_flag_field_size_64_bit = 1 << 24, // Not sure what is
// e_flag_field_size_64_bit = 1 << 24, // Not sure what is
// e_unknown_25 = 1 << 25,
// e_unknown_26 = 1 << 26,
// e_unknown_27 = 1 << 27,
Expand Down Expand Up @@ -276,8 +276,8 @@ void ReadData(const char*& sbegin_out, const char*& send_out, const char* input,
case 'f':
case 'd':
case 'l':
case 'i': {

case 'i':
case 'c': {
const uint32_t length = ReadWord(input, cursor, end);
const uint32_t encoding = ReadWord(input, cursor, end);

Expand All @@ -298,6 +298,10 @@ void ReadData(const char*& sbegin_out, const char*& send_out, const char* input,
stride = 8;
break;

case 'c':
stride = 1;
break;

default:
ai_assert(false);
};
Expand Down
Binary file added test/models/FBX/boxWithCompressedCTypeArray.FBX
Binary file not shown.
Binary file added test/models/FBX/boxWithUncompressedCTypeArray.FBX
Binary file not shown.

0 comments on commit fadfaf8

Please sign in to comment.