From: James Moger Date: Wed, 13 Jul 2011 00:27:56 +0000 (-0400) Subject: Fix to build method. X-Git-Tag: v0.5.2~20 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=9cf48d26e7c95306844a2f8e640cd691de3be220;p=gitblit.git Fix to build method. --- diff --git a/build.xml b/build.xml index 954bc03f..ab794136 100644 --- a/build.xml +++ b/build.xml @@ -2,7 +2,8 @@ - + diff --git a/src/com/gitblit/build/Build.java b/src/com/gitblit/build/Build.java index 998e7ba6..bd5e2f32 100644 --- a/src/com/gitblit/build/Build.java +++ b/src/com/gitblit/build/Build.java @@ -313,7 +313,7 @@ public class Build { String anim = "=========="; int width = Math.round(anim.length() * progress); System.out.print("\r["); - System.out.print(anim.substring(0, width)); + System.out.print(anim.substring(0, Math.min(width, anim.length()))); for (int i = 0; i < anim.length() - width; i++) { System.out.print(' '); }