mirror of
https://github.com/mandiant/capa.git
synced 2026-06-12 19:11:32 -07:00
e2c8ab4bff
ARM Thumb-2 has legal 2-operand forms like `add sp, #0x10` and `add r0, #1`. The previous code asserted exactly 3 operands before checking if operand[1] was a stack register, causing AssertionError on any 2-operand encoding. The fix converts the assert to a guard condition so 2-operand instructions fall through to the for-loop and are processed normally.