Skip to content

Commit

Permalink
Fix faces and repetitions being swapped in DiceExpression
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoconti83 committed Jul 24, 2016
1 parent c49c1aa commit 75b2d03
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/DiceExpression.swift
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,8 @@ enum DiceExpressionComponent {
if(splitted.count != 2) {
return nil
}
if let sides = UInt32(splitted[0]), let repetitions = UInt32(splitted[1]) {
self = .Dice(faces: sides, repetitions: repetitions)
if let faces = UInt32(splitted[1]), let repetitions = UInt32(splitted[0]) {
self = .Dice(faces: faces, repetitions: repetitions)
return
}
else {
Expand Down

0 comments on commit 75b2d03

Please sign in to comment.