clplaner: Avoid a segfault on Wed May 27 20:00 CET 2009
authorMarkus Bröker <mbroeker@largo.dyndns.tv>
Thu, 16 Apr 2009 12:51:15 +0200
changeset 78 e87e0fe4a7db
parent 77 49e0babccb23
child 79 1499176750b9
clplaner: Avoid a segfault on Wed May 27 20:00 CET 2009 * The IndexShaker would crash on the last two teams - fixed committer: Markus Bröker <mbroeker@largo.homelinux.org>
clplaner.c
--- a/clplaner.c
+++ b/clplaner.c
@@ -107,6 +107,12 @@
     int i, j, k;
 
     /*
+     * Who wins the Title?
+     */
+    if (teams == 1)
+        return;
+
+    /*
      * swap the index MAXLOOP times...
      */
     for (i = 0; i < MAXLOOP; i++) {