aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/ArgParser.java5
-rw-r--r--src/argparser.bash1
2 files changed, 5 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);
diff --git a/src/argparser.bash b/src/argparser.bash
index 76e7d6b..70d6eb1 100644
--- a/src/argparser.bash
+++ b/src/argparser.bash
@@ -428,6 +428,7 @@ function args_help
fi
done
col=$(( $col + 8 - (($col - 4) & 7) ))
+ empty="${empty} "
while (( ${#empty} < $col )); do
empty="${empty}${empty}"
done