Skip to content

Commit

Permalink
Prevent setting values less than MinAgeLimit
Browse files Browse the repository at this point in the history
  • Loading branch information
ReubenBond committed Oct 20, 2023
1 parent 59c1dcd commit 2d3f369
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ private TimeSpan CalculateValue()
var span = AlwaysActive
? TimeSpan.FromDays(short.MaxValue)
: TimeSpan.FromDays(Days) + TimeSpan.FromHours(Hours) + TimeSpan.FromMinutes(Minutes);
return span <= TimeSpan.Zero
return span < MinAgeLimit
? MinAgeLimit
: span;
}
Expand Down

0 comments on commit 2d3f369

Please sign in to comment.