mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 02:39:44 +02:00
GT-3032 corrected aligned structure packer exception triggered by
flexible array
This commit is contained in:
parent
d8e9384d4f
commit
7b2d94b3f0
1 changed files with 2 additions and 1 deletions
|
@ -59,7 +59,8 @@ class AlignedComponentPacker {
|
||||||
* @param isLastComponent true if dtc is the last component within the structure
|
* @param isLastComponent true if dtc is the last component within the structure
|
||||||
*/
|
*/
|
||||||
void addComponent(InternalDataTypeComponent dtc, boolean isLastComponent) {
|
void addComponent(InternalDataTypeComponent dtc, boolean isLastComponent) {
|
||||||
if (dtc.getDataType() == DataType.DEFAULT || dtc.isFlexibleArrayComponent()) {
|
if (dtc.getDataType() == DataType.DEFAULT ||
|
||||||
|
(dtc.isFlexibleArrayComponent() && !isLastComponent)) {
|
||||||
throw new IllegalArgumentException("unsupported component");
|
throw new IllegalArgumentException("unsupported component");
|
||||||
}
|
}
|
||||||
if (!packComponent(dtc)) {
|
if (!packComponent(dtc)) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue