From a3a128354d7ed6cc03a9841356e8196e931e2b8f Mon Sep 17 00:00:00 2001 From: Kwarde Date: Sun, 6 Jul 2025 10:53:23 +0200 Subject: [PATCH] zero AL, not RAX in strlen() (SCASB uses AL, so no need to zero all bits) --- src/string.asm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/string.asm b/src/string.asm index 4563754..9205533 100644 --- a/src/string.asm +++ b/src/string.asm @@ -11,7 +11,7 @@ section .text ; rdi* (arg) Pointer to str[] ; rcx* Counter for scasb strlen: - xor rax, rax + xor al, al mov rcx, -1 cld repne scasb