diff options
| author | Mason Reed <mason@vector35.com> | 2025-07-21 15:41:00 -0400 |
|---|---|---|
| committer | Peter LaFosse <peter@vector35.com> | 2025-07-22 09:21:20 -0400 |
| commit | b29278c256f0b2269e2a28ab80d158e8005c19a3 (patch) | |
| tree | 2debbb2f5963169ad83ec209a7f7015f0631aefa /rust/src | |
| parent | 9416e3dd8ea4dab4ab50e215e11f2cd7a4264948 (diff) | |
Fix non-clickable force analysis with rust render layer on
Fixes https://github.com/Vector35/binaryninja-api/issues/7139
Diffstat (limited to 'rust/src')
| -rw-r--r-- | rust/src/disassembly.rs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/rust/src/disassembly.rs b/rust/src/disassembly.rs index ab25ce1d..c1021197 100644 --- a/rust/src/disassembly.rs +++ b/rust/src/disassembly.rs @@ -430,7 +430,10 @@ pub enum InstructionTextTokenKind { ty: StringType, }, CharacterConstant, - Keyword, + Keyword { + // Example usage can be found for `BNAnalysisWarningActionType`. + value: u64, + }, TypeName, FieldName { /// Offset to this field in the respective structure @@ -619,7 +622,7 @@ impl InstructionTextTokenKind { _ => Self::String { value: value.value }, }, BNInstructionTextTokenType::CharacterConstantToken => Self::CharacterConstant, - BNInstructionTextTokenType::KeywordToken => Self::Keyword, + BNInstructionTextTokenType::KeywordToken => Self::Keyword { value: value.value }, BNInstructionTextTokenType::TypeNameToken => Self::TypeName, BNInstructionTextTokenType::FieldNameToken => Self::FieldName { offset: value.value, @@ -735,6 +738,7 @@ impl InstructionTextTokenKind { InstructionTextTokenKind::HexDumpText { width, .. } => Some(*width), InstructionTextTokenKind::String { value, .. } => Some(*value), InstructionTextTokenKind::StringContent { ty, .. } => Some(*ty as u64), + InstructionTextTokenKind::Keyword { value, .. } => Some(*value), InstructionTextTokenKind::FieldName { offset, .. } => Some(*offset), InstructionTextTokenKind::StructOffset { offset, .. } => Some(*offset), InstructionTextTokenKind::StructureHexDumpText { width, .. } => Some(*width), @@ -843,7 +847,7 @@ impl From<InstructionTextTokenKind> for BNInstructionTextTokenType { InstructionTextTokenKind::CharacterConstant => { BNInstructionTextTokenType::CharacterConstantToken } - InstructionTextTokenKind::Keyword => BNInstructionTextTokenType::KeywordToken, + InstructionTextTokenKind::Keyword { .. } => BNInstructionTextTokenType::KeywordToken, InstructionTextTokenKind::TypeName => BNInstructionTextTokenType::TypeNameToken, InstructionTextTokenKind::FieldName { .. } => { BNInstructionTextTokenType::FieldNameToken |
