VirtualBox

Ignore:
Timestamp:
Aug 1, 2013 6:29:36 PM (11 years ago)
Author:
vboxsync
Message:

tiny fix I forgot committing last week.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Storage/VDIfVfs.cpp

    r47345 r47515  
    8888    int rc = vdIfIoFileReadSync(pThis->pVDIfsIo, pThis->pvStorage, off, pSgBuf[0].pvSegCur, pSgBuf->paSegs[0].cbSeg, pcbRead);
    8989    if (RT_SUCCESS(rc))
    90         pThis->offCurPos = off + (pcbRead ? *pcbRead : pSgBuf->paSegs[0].cbSeg);
     90        pThis->offCurPos = (off == -1 ? pThis->offCurPos : off)
     91                         + (pcbRead ? *pcbRead : pSgBuf->paSegs[0].cbSeg);
    9192    return rc;
    9293}
     
    106107    int rc = vdIfIoFileWriteSync(pThis->pVDIfsIo, pThis->pvStorage, off, pSgBuf[0].pvSegCur, pSgBuf->paSegs[0].cbSeg, pcbWritten);
    107108    if (RT_SUCCESS(rc))
    108         pThis->offCurPos = off + (pcbWritten ? *pcbWritten : pSgBuf->paSegs[0].cbSeg);
     109        pThis->offCurPos = (off == -1 ? pThis->offCurPos : off)
     110                         + (pcbWritten ? *pcbWritten : pSgBuf->paSegs[0].cbSeg);
    109111    return rc;
    110112}
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