Skip to content

Commit 7a1a1cc

Browse files
committed
Corrected rolled arguments validation
1 parent 93b8d45 commit 7a1a1cc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

dice_notation/dice.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ def roll(self):
129129

130130
if self.quantity == 0 or self.sides == 0:
131131
result = 0
132-
elif self.quantity > 0 and self.sides > 0:
132+
elif self.quantity and self.quantity > 0 and self.sides and self.sides > 0:
133133
for x in xrange(self.quantity):
134134
result += randint(1, self.sides)
135135
else:

0 commit comments

Comments
 (0)