From 0226a73370445da57777024f48b22d739ff8b401 Mon Sep 17 00:00:00 2001
From: "A. R. Shajii" <ars@ars.me>
Date: Wed, 5 Jul 2023 07:47:16 -0400
Subject: [PATCH] Fix str.zfill() for empty string

---
 stdlib/internal/str.codon | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/stdlib/internal/str.codon b/stdlib/internal/str.codon
index 274da890..eef412ba 100644
--- a/stdlib/internal/str.codon
+++ b/stdlib/internal/str.codon
@@ -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