VirtualBox

Changeset 41180 in vbox for trunk/src/bldprogs/scmstream.cpp


Ignore:
Timestamp:
May 6, 2012 11:51:14 PM (13 years ago)
Author:
vboxsync
Message:

fix

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bldprogs/scmstream.cpp

    r41179 r41180  
    693693    const char *pszLine  = ScmStreamGetLineByNo(pStream, iCurLine, pcchLine, penmEol);
    694694    if (   pszLine
    695         && pStream->paLines[iCurLine].off < offCur)
     695        && offCur > pStream->paLines[iCurLine].off)
    696696    {
    697697        offCur -= pStream->paLines[iCurLine].off;
    698         Assert(offCur <= pStream->paLines[iCurLine].off);
    699         *pcchLine -= offCur;
    700         pszLine   += offCur;
     698        Assert(offCur <= pStream->paLines[iCurLine].cch + pStream->paLines[iCurLine].enmEol);
     699        if (offCur < pStream->paLines[iCurLine].cch)
     700            *pcchLine  -= offCur;
     701        else
     702            *pcchLine   = 0;
     703        pszLine        += offCur;
    701704    }
    702705    return pszLine;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette