From 3d2bf1b40d956d43485cd8ea797df86a409f3038 Mon Sep 17 00:00:00 2001 From: Kwarde Date: Sun, 6 Jul 2025 21:26:26 +0200 Subject: [PATCH] printf(): Fix wrong instruction when fetching arg from stack (lea->mov : arg already is (supposed to be) an address) --- src/console.asm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/console.asm b/src/console.asm index 14bf615..6df076d 100644 --- a/src/console.asm +++ b/src/console.asm @@ -138,7 +138,7 @@ printf: mov rsi, [printfArgs + SIZE_QWORD * rdx] jmp .insertString .s_fromStack: - lea rsi, [rbp + RBP_OFFSET_CALLER + ((rdx-5) * SIZE_QWORD)] + mov rsi, [rbp + RBP_OFFSET_CALLER + ((rdx-5) * SIZE_QWORD)] ;--- Insert string to buffer ---; .insertString: