[mythtv-commits] Ticket #1803: Configuring number of channels causes channel names to be missaligned with program information.

MythTV mythtv at cvs.mythtv.org
Fri May 12 19:40:39 EDT 2006


#1803: Configuring number of channels causes channel names to be missaligned with
program information.
-----------------------+----------------------------------------------------
 Reporter:  anonymous  |        Owner:  ijr 
     Type:  defect     |       Status:  new 
 Priority:  minor      |    Milestone:      
Component:  mythtv     |      Version:  0.19
 Severity:  medium     |   Resolution:      
-----------------------+----------------------------------------------------
Comment (by anonymous):

 This may be an off-by-one error : my configuration actually has SIX
 channels configured.

 http://svn.mythtv.org/trac/browser/trunk/mythtv/libs/libmythtv/guidegrid.cpp#L247
 247         maxchannel = max((int)m_channelInfos.size() - 1, 0);
 248         setStartChannel((int)(m_currentStartChannel) -
 249                         (int)(desiredDisplayChans / 2));
 250         if (DISPLAY_CHANS > maxchannel)
 251             DISPLAY_CHANS = maxchannel

 maxchannel look like a zero-based index, and DISPLAY_CHANS is a one-based
 number. Surely the "if" clause is off-by-one?

-- 
Ticket URL: <http://svn.mythtv.org/trac/ticket/1803>
MythTV <http://www.mythtv.org/>
MythTV


More information about the mythtv-commits mailing list