aboutsummaryrefslogtreecommitdiffstats
path: root/src/ArgParser.java
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2013-06-27 11:23:38 +0200
committerMattias Andrée <maandree@operamail.com>2013-06-27 11:23:38 +0200
commitb90259e99cbf2d0452b343d370556ee50fde293a (patch)
tree51b3c28aa93c23140278a25f9031fc6e9e4f77bd /src/ArgParser.java
parentm bug fix + beginning of java test (diff)
downloadargparser-b90259e99cbf2d0452b343d370556ee50fde293a.tar.gz
argparser-b90259e99cbf2d0452b343d370556ee50fde293a.tar.bz2
argparser-b90259e99cbf2d0452b343d370556ee50fde293a.tar.xz
m
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src/ArgParser.java')
-rw-r--r--src/ArgParser.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ArgParser.java b/src/ArgParser.java
index ac37a93..dbddd07 100644
--- a/src/ArgParser.java
+++ b/src/ArgParser.java
@@ -836,7 +836,7 @@ public class ArgParser
if (maxfirstlen < opt.alternatives[0].length())
maxfirstlen = opt.alternatives[0].length();
}
- String empty = " ";
+ empty += " ";
while (empty.length() < maxfirstlen)
empty += empty;
empty = empty.substring(0, maxfirstlen);
@@ -874,6 +874,9 @@ public class ArgParser
col = len[0];
col += 8 - ((col - 4) & 7);
int index = 0;
+
+ if (maxfirstlen == 0)
+ empty = " ";
while (empty.length() < col)
empty += empty;
empty = empty.substring(0, col);