Fix incorrect handling of DW_FORM_flag_present.

This form implicitly indicates a flag value of true without a
corresponding byte in the datastream. As such, we were introducing off
by one errors when parsing one.
This commit is contained in:
Rene Gollent 2013-07-16 08:19:28 -04:00
parent d3a795bcb4
commit a074f3547a

View File

@ -1257,7 +1257,7 @@ DwarfFile::_ParseEntryAttributes(DataReader& dataReader,
value = dataReader.ReadUnsignedLEB128(0);
break;
case DW_FORM_flag_present:
attributeValue.SetToFlag(dataReader.Read<uint8>(0) != 0);
attributeValue.SetToFlag(true);
break;
case DW_FORM_ref_sig8:
value = dataReader.Read<uint64>(0);