From acd0afbeba774b596473d0bc9c135e4969c6a985 Mon Sep 17 00:00:00 2001 From: Kwarde Date: Mon, 23 Jun 2025 15:55:38 +0200 Subject: [PATCH] Fix jumps in tolower/toupper; .dtu/.dtl would always be reached. --- core.asm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core.asm b/core.asm index 2678778..fda7797 100644 --- a/core.asm +++ b/core.asm @@ -99,10 +99,10 @@ tolower: mov rcx, rax mov al, byte [rdi] cmp rcx, 1 - je .dtl - .dtl: + jne .quit add al, 32 + .quit: leave ret ;----- toupper(char* c) -----; @@ -116,9 +116,9 @@ toupper: mov rcx, rax mov al, byte [rdi] cmp rcx, 1 - je .dtu - .dtu: + jne .quit sub al, 32 + .quit: leave ret