fixed nextPolicy (for serious this time)

This commit is contained in:
Jonathan Lamothe 2018-12-21 16:44:25 -05:00
parent 0260f665dc
commit 570cfe4af2

View File

@ -231,7 +231,7 @@ nextPolicy x p = over pwLength pred $
then dec pwDigits then dec pwDigits
else case p^.pwSpecial of else case p^.pwSpecial of
Nothing -> set pwSpecial (Just (-1)) p Nothing -> set pwSpecial (Just (-1)) p
Just x -> set pwSpecial (Just $ pred x) p Just _ -> dec $ pwSpecial . traverse
where where
dec l = over l (max 0 . pred) p dec l = over l (max 0 . pred) p