We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
seq -w 0 0
1 parent 9420773 commit 20b878bCopy full SHA for 20b878b
userland/utilities/seq.py
@@ -60,7 +60,7 @@ def arg_to_decimal(arg: str) -> Decimal:
60
61
if len(args) == 1:
62
last = arg_to_decimal(args[0])
63
- if not last:
+ if last == 0:
64
return 0
65
66
first = Decimal(1)
@@ -90,7 +90,7 @@ def arg_to_decimal(arg: str) -> Decimal:
90
formatstr: str
91
92
if opts.equal_width:
93
- padding = math.floor(math.log10(last))
+ padding = 0 if last == 0 else math.floor(math.log10(last))
94
padding += -exponent + 2 if exponent else 1
95
if first < 0 or last < 0:
96
padding += 1
0 commit comments