Adium

Changeset 24342

Show
Ignore:
Timestamp:
07/14/2008 05:32:32 PM (6 months ago)
Author:
sholt
Message:

This extra assignment was no longer needed and was causing the unit test added in [24341] to fail. Thanks to cfm for pointing this out. Also, removed a condition that caused a second check of the last character in a string in all cases.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Frameworks/AutoHyperlinks Framework/Source/AHHyperlinkScanner.m

    r24284 r24342  
    306306                } 
    307307                 
    308         m_scanLocation = _scanLoc - finalStringLen; 
    309  
    310308        // if we have a valid URL then save the scanned string, and make a SHMarkedHyperlink out of it. 
    311309        // this way, we can preserve things like the matched string (to be converted to a NSURL), 
     
    358356                if (startRange.location != NSNotFound) { 
    359357                        m_scanLocation += startRange.length; 
    360                         if(m_scanLocation >= m_scanStringLength) 
     358                        if(m_scanLocation > m_scanStringLength) 
    361359                                m_scanLocation--; 
    362360                }else{ 
    363361                        m_scanLocation += finalStringLen; 
    364                         if(m_scanLocation >= m_scanStringLength) 
     362                        if(m_scanLocation > m_scanStringLength) 
    365363                                m_scanLocation--; 
    366364                }