Fix domain file ID comparison#212
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| private DomainFile findDomainFileById(DomainFolder folder, long domainFileId) { | ||
| for (DomainFile file : folder.getFiles()) { | ||
| if (file.getFileID() == domainFileId) { | ||
| if (String.valueOf(domainFileId).equals(file.getFileID())) { | ||
| return file; |
There was a problem hiding this comment.
Domain file lookup always misses by ID
The new comparison in findDomainFileById converts the numeric domainFileId to a String and compares it to file.getFileID(). In the Ghidra API DomainFile.getFileID() returns a long, so this call becomes String.equals(Long), which is always false. As a result, any request that supplies a valid domain_file_id will now fail to find the file and fall through to the warning/null path, breaking ID-based lookups.
Useful? React with 👍 / 👎.
…ebyid-type-comparison Fix domain file ID comparison
Summary
Testing
Codex Task