VirtualBox

Changeset 1231 in kBuild for trunk/src/kmk/kmkbuiltin


Ignore:
Timestamp:
Oct 9, 2007 11:07:29 PM (17 years ago)
Author:
bird
Message:

Strip both \r\n and \n.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kmk/kmkbuiltin/md5sum.c

    r1183 r1231  
    466466            rc2 = (int)strlen(psz);
    467467            if (psz[rc2 - 1] == '\n')
    468                 psz[rc2 - 1] = '\0';
     468                psz[rc2 - (rc2 >= 2 && psz[rc2 - 2] == '\r' ? 2 : 1)] = '\0';
    469469
    470470            /* skip to the end of the digest and terminate it. */
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