Skip to content

Commit

Permalink
fix a bug in calculating size of fields inside packed structs
Browse files Browse the repository at this point in the history
  • Loading branch information
Xuejun Yang committed Jul 12, 2011
1 parent 4b68f63 commit 4ba524b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Type.cpp
Expand Up @@ -1414,6 +1414,7 @@ Type::SizeInBytes(void) const
unsigned int total_size = 0;
for (i=0; i<fields.size(); i++) {
unsigned int sz = fields[i]->SizeInBytes();
if (sz == SIZE_UNKNOWN) return sz;
total_size += sz;
}
return total_size;
Expand Down

0 comments on commit 4ba524b

Please sign in to comment.