From b52599ae2d020ee4249577c522815c7fcb3cb648 Mon Sep 17 00:00:00 2001 From: Matthew Berry Date: Sat, 10 Oct 2020 20:38:48 -0700 Subject: [PATCH] thumb fix conditional branch crash on wrong int type --- src/crab/thumb/conditional_branch.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/crab/thumb/conditional_branch.cr b/src/crab/thumb/conditional_branch.cr index 75aa7df..3477790 100644 --- a/src/crab/thumb/conditional_branch.cr +++ b/src/crab/thumb/conditional_branch.cr @@ -1,7 +1,7 @@ module THUMB def thumb_conditional_branch(instr : Word) : Nil cond = bits(instr, 8..11) - offset = bits(instr, 0..7).to_i8! + offset = bits(instr, 0..7).to_i8!.to_i32 if check_cond cond @r[15] &+= (offset * 2) clear_pipeline