VirtualBox

Changeset 8954 in vbox for trunk/src/VBox/Runtime


Ignore:
Timestamp:
May 20, 2008 2:02:01 PM (17 years ago)
Author:
vboxsync
Message:

Don't fail on 0 byte files.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/generic/RTFileReadAllByHandleEx-generic.cpp

    r8925 r8954  
    6363                cbAllocFile = cbMax;
    6464            size_t cbAllocMem = (size_t)cbAllocFile;
    65             if (    (RTFOFF)cbAllocMem == cbAllocFile
    66                 &&  cbAllocMem)
     65            if ((RTFOFF)cbAllocMem == cbAllocFile)
    6766            {
    6867                /*
     
    9998                    rc = VERR_NO_MEMORY;
    10099            }
    101             else if (!cbAllocMem)
    102                 rc = VERR_EOF;
    103100            else
    104101                rc = VERR_TOO_MUCH_DATA;
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