Skip to content

Commit

Permalink
Fix str.zfill() for empty string
Browse files Browse the repository at this point in the history
  • Loading branch information
arshajii committed Jul 5, 2023
1 parent c96b292 commit 0226a73
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion stdlib/internal/str.codon
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ class str:
fill = width - len(self)
p = zf.ptr

if len(self) > 0 and p[fill] == plus or p[fill] == minus:
if len(self) > 0 and (p[fill] == plus or p[fill] == minus):
p[0] = p[fill]
p[fill] = zero

Expand Down

0 comments on commit 0226a73

Please sign in to comment.