VirtualBox

Changeset 75008 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Oct 23, 2018 4:08:44 PM (6 years ago)
Author:
vboxsync
Message:

IPRT/RTCString: reserve(1) called on an empty string must allocate memory.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/testcase/tstIprtMiniString.cpp

    r69111 r75008  
    8282    CHECK(empty.length() == 0);
    8383    CHECK(empty.capacity() == 0);
     84
     85    empty.reserve(1);
     86    CHECK(empty.length() == 0);
     87    CHECK(empty.capacity() == 1);
     88    char *pszEmpty = empty.mutableRaw();
     89    CHECK(pszEmpty != NULL);
    8490
    8591    RTCString sixbytes("12345");
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