VirtualBox

Changeset 16774 in vbox for trunk/src/VBox/Runtime/common


Ignore:
Timestamp:
Feb 15, 2009 4:23:47 AM (16 years ago)
Author:
vboxsync
Message:

RTBase64: no trailing newline.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/string/base64.cpp

    r16766 r16774  
    423423
    424424        cch += (cch / RTBASE64_LINE_LEN) * RTBASE64_EOL_SIZE;
     425        cch -= (cch % RTBASE64_LINE_LEN) == 0;
    425426        return cch;
    426427    }
     
    432433
    433434    cch += (cch / RTBASE64_LINE_LEN) * RTBASE64_EOL_SIZE;
     435    cch -= (cch % RTBASE64_LINE_LEN) == 0;
    434436    return cch;
    435437}
     
    485487        pbSrc  += 3;
    486488
    487         if (cbBuf == cbLineFeed)
     489        /* deal out linefeeds */
     490        if (cbBuf == cbLineFeed && cbData)
    488491        {
    489492            if (cbBuf < RTBASE64_EOL_SIZE + 1)
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