From 9cf48d26e7c95306844a2f8e640cd691de3be220 Mon Sep 17 00:00:00 2001 From: James Moger Date: Tue, 12 Jul 2011 20:27:56 -0400 Subject: [PATCH] Fix to build method. --- build.xml | 3 ++- src/com/gitblit/build/Build.java | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) 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(' '); } -- 2.39.5