Showing
1 changed file
with
5 additions
and
1 deletions
@@ -48,7 +48,11 @@ public class ExeProjectTask implements Runnable { | @@ -48,7 +48,11 @@ public class ExeProjectTask implements Runnable { | ||
48 | if (array.length <= 4) { | 48 | if (array.length <= 4) { |
49 | firstLength = 1; | 49 | firstLength = 1; |
50 | } else { | 50 | } else { |
51 | - firstLength = array.length / 2 - 1; | 51 | + if ((array.length - 1) % 2 == 0){ |
52 | + firstLength = (array.length - 1) / 2; | ||
53 | + }else { | ||
54 | + firstLength = (array.length - 1) / 2 - 1; | ||
55 | + } | ||
52 | } | 56 | } |
53 | 57 | ||
54 | for (int i = 0; i < array.length; i++) { | 58 | for (int i = 0; i < array.length; i++) { |
-
Please register or login to post a comment