forgot to increment rdi in loop