diff --git a/build/artifacts/release/Paper-Bin.out b/build/artifacts/release/Paper-Bin.out index bb36762..23ade2b 100644 Binary files a/build/artifacts/release/Paper-Bin.out and b/build/artifacts/release/Paper-Bin.out differ diff --git a/build/release/Paper-Bin.out b/build/release/Paper-Bin.out index bb36762..23ade2b 100755 Binary files a/build/release/Paper-Bin.out and b/build/release/Paper-Bin.out differ diff --git a/build/release/out/c/Paper-Bin.o b/build/release/out/c/Paper-Bin.o index 86296f8..645ad72 100644 Binary files a/build/release/out/c/Paper-Bin.o and b/build/release/out/c/Paper-Bin.o differ diff --git a/src/Paper-Bin.c b/src/Paper-Bin.c index 7f2942d..412c42e 100644 --- a/src/Paper-Bin.c +++ b/src/Paper-Bin.c @@ -174,17 +174,19 @@ void sortScoreboard() numberOfLines = j; sleep(100); } - struct Player temp; + + struct Player temp; for (int i = 0; i <= numberOfLines; i++) { - if (playerlist[i].Points < playerlist[i + 1].Points) - { - temp = playerlist[i]; - playerlist[i] = playerlist[i + 1]; - playerlist[i + 1] = temp; - } - } - + for (int j = 0; j < (numberOfLines - i); j++) + { + if (playerlist[i].Points < playerlist[i + 1].Points) + { + temp = playerlist[i]; + playerlist[i] = playerlist[i + 1]; + playerlist[i + 1] = temp; + } + } } fclose(fp); }