Opened 18 years ago
Closed 16 years ago
#4971 closed defect (fixed)
HouseKeeper::wantToRun() randomization incorrect for maxhour < hour
| Reported by: | Owned by: | Isaac Richards | |
|---|---|---|---|
| Priority: | minor | Milestone: | unknown |
| Component: | mythtv | Version: | 0.21-fixes |
| Severity: | low | Keywords: | |
| Cc: | Ticket locked: | no |
Description
For the case
minhour > maxhour (i.e. window includes midnight) hour > maxhour (i.e. before midnight)
the first term of the formula in HouseKeeper::wantToRun()
(maxhour-hour)*12+(60-minute)/5...
turns negative. That negative value is then used for a modulo division...
Attachments (2)
Change History (3)
by , 18 years ago
| Attachment: | mythtv-0.21-wanttorun-hour-bigger-than-maxhour.patch added |
|---|
by , 18 years ago
| Attachment: | mythtv-0.21-wanttorun-hour-bigger-than-maxhour.2.patch added |
|---|
Corrected comment
comment:1 by , 16 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
Note:
See TracTickets
for help on using tickets.

Add ((24 + ...)%24) to make sure the value is always positive