From e885c492ad79fdc37aa73028060f490fa76391b8 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Mon, 5 Dec 2022 22:23:51 +0100 Subject: [PATCH] Fix broken sort algorithm --- app/src/main/java/ch/nuth/zhaw/exbox/SortServer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/ch/nuth/zhaw/exbox/SortServer.java b/app/src/main/java/ch/nuth/zhaw/exbox/SortServer.java index 48c5d90..0cc5be1 100644 --- a/app/src/main/java/ch/nuth/zhaw/exbox/SortServer.java +++ b/app/src/main/java/ch/nuth/zhaw/exbox/SortServer.java @@ -51,7 +51,7 @@ public class SortServer implements CommandExecutor { int minIndex = i; for (int j = i; j < a.length; j++) { - if (a[j] < a[i]) { + if (a[j] < a[minIndex]) { minIndex = j; } }