aboutsummaryrefslogtreecommitdiff
path: root/src/main.s
diff options
context:
space:
mode:
authormithe24 <mithe24@student.sdu.dk>2025-10-27 09:08:22 +0100
committermithe24 <mithe24@student.sdu.dk>2025-10-29 13:49:57 +0100
commit4f17cf1441ebbe13137bdd2acf4a7ba3228b80b5 (patch)
treec4babc9cee1b46452d53c73e50258e146c186a76 /src/main.s
parent2e39f481369d708cf2c723136c3bf4c765d6c994 (diff)
downloadsorter-4f17cf1441ebbe13137bdd2acf4a7ba3228b80b5.tar.gz
sorter-4f17cf1441ebbe13137bdd2acf4a7ba3228b80b5.zip
fix(qsort): Quicksort errors. And why is length 1-indexed :(
Diffstat (limited to '')
-rw-r--r--src/main.s1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/main.s b/src/main.s
index 196515f..bad6042 100644
--- a/src/main.s
+++ b/src/main.s
@@ -16,6 +16,7 @@ _start:
# Sort
movq %rax, %rdi # Select address of array
movq %r15, %rsi # Select length of array
+ decq %rsi
movq $1, %rdx # Sort by key 1
call qsort # Sort the array