diff options
Diffstat (limited to 'src')
-rwxr-xr-x | src/usr/targeting/common/xmltohb/xmltohb.pl | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/usr/targeting/common/xmltohb/xmltohb.pl b/src/usr/targeting/common/xmltohb/xmltohb.pl index 2924e0437..f0db364f8 100755 --- a/src/usr/targeting/common/xmltohb/xmltohb.pl +++ b/src/usr/targeting/common/xmltohb/xmltohb.pl @@ -1905,10 +1905,20 @@ sub writeAttrErrlHFile { print $outFile "\n"; print $outFile " switch (attrEnum) {\n"; + my $attributeIdEnum = getAttributeIdEnumeration($attributes); + # loop through every attribute to make the swith/case foreach my $attribute (@{$attributes->{attribute}}) { - my $attrVal = sprintf "0x%08X", $attribute->{value}; + my $attrVal; + foreach my $enum (@{$attributeIdEnum->{enumerator}}) + { + if ($enum->{name} eq $attribute->{id}) + { + $attrVal = $enum->{value}; + last; # don't need to look at any others. + } + } print $outFile " case ",$attrVal,": {\n"; # things we'll skip: |