Skip to content

Commit

Permalink
UEFIHelper: Avoid incompatible casts in propagateGlobalVariables
Browse files Browse the repository at this point in the history
  • Loading branch information
al3xtjames committed Nov 4, 2022
1 parent afa5249 commit 922591c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions ghidra_scripts/UEFIHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,11 @@ private void propagateGlobalVariables(ClangTokenGroup root) throws Exception {
}
} else {
ClangFieldToken sourceToken = (ClangFieldToken) sourceNode;
Structure structureType = (Structure) sourceToken.getDataType();
sourceDataType = structureType.getDataTypeAt(
sourceToken.getOffset()).getDataType();
if (sourceToken instanceof Structure) {
Structure structureType = (Structure) sourceToken.getDataType();
sourceDataType = structureType.getDataTypeAt(
sourceToken.getOffset()).getDataType();
}
}

// Apply label names for certain global variables.
Expand Down

0 comments on commit 922591c

Please sign in to comment.