Skip to content

Commit

Permalink
fix a bug in hashing union fields
Browse files Browse the repository at this point in the history
  • Loading branch information
Xuejun Yang committed Aug 24, 2011
1 parent b911750 commit ea4762b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Type.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1508,10 +1508,10 @@ Type::get_int_subfield_names(string prefix, vector<string>& names, const vector<
size_t i;
size_t j = 0;
for (i=0; i<fields.size(); i++) {
// skip 0 length bitfields and excluded fields
if (std::find(excluded_fields.begin(), excluded_fields.end(), i) != excluded_fields.end() ||
is_unamed_padding(i)) {
if (!is_unamed_padding(i)) j++;
if (is_unamed_padding(i)) continue; // skip 0 length bitfields
// skip excluded fields
if (std::find(excluded_fields.begin(), excluded_fields.end(), j) != excluded_fields.end()) {
j++;
continue;
}
ostringstream oss;
Expand Down

0 comments on commit ea4762b

Please sign in to comment.