diff --git a/firmware/asm/arm/memset.S b/firmware/asm/arm/memset.S index 682da874ce..64cd95cc9e 100644 --- a/firmware/asm/arm/memset.S +++ b/firmware/asm/arm/memset.S @@ -50,6 +50,7 @@ memset: /* * we know that the pointer in r0 is aligned to a word boundary. */ + and r1, r1, #255 @ clear sign bits orr r1, r1, r1, lsl #8 orr r1, r1, r1, lsl #16 mov r3, r1