VirtualBox

Changeset 51887 in vbox for trunk/src


Ignore:
Timestamp:
Jul 6, 2014 7:35:16 PM (11 years ago)
Author:
vboxsync
Message:

Utf8Str: Fix assignEx with a_offSrc != 0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/glue/string.cpp

    r49039 r51887  
    247247 *
    248248 * @param   a_pcszSrc   The source string.
     249 * @param   a_offSrc    Start offset to copy from.
    249250 * @param   a_cchSrc    The source string.
    250251 * @returns S_OK or E_OUTOFMEMORY.
     
    253254 *          code space.)
    254255 */
    255 HRESULT Utf8Str::copyFromExNComRC(const char *a_pcszSrc, size_t a_cchSrc)
     256HRESULT Utf8Str::copyFromExNComRC(const char *a_pcszSrc, size_t a_offSrc, size_t a_cchSrc)
    256257{
    257258    cleanup();
     
    263264            m_cch = a_cchSrc;
    264265            m_cbAllocated = a_cchSrc + 1;
    265             memcpy(m_psz, a_pcszSrc, a_cchSrc);
     266            memcpy(m_psz, a_pcszSrc + a_offSrc, a_cchSrc);
    266267            m_psz[a_cchSrc] = '\0';
    267268        }
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