Ignore:
Timestamp:
Apr 5, 2001, 9:06:10 PM (24 years ago)
Author:
sandervl
Message:

WideCharToMultiByte/MultiByteToWideChar changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kernel32/codepage.cpp

    r5461 r5485  
    342342#endif
    343343
    344     if (!src || (!dst && dstlen))
     344    //Docs say source ptr can't be the same as destination (Windows ME, NT4-SP6)
     345    if (!src || (!dst && dstlen) || ((void *)src == (void *)dst))
    345346    {
    346347        SetLastError( ERROR_INVALID_PARAMETER );
     
    348349    }
    349350
    350     if (srclen == -1) srclen = strlen(src) + 1;
     351    //Even though the docs claim this only works for -1, testing shows it
     352    //is done for any negative value (Windows ME, NT4-SP6)
     353    if (srclen <= -1) srclen = strlen(src) + 1;
    351354
    352355    if (flags & MB_USEGLYPHCHARS) FIXME("MB_USEGLYPHCHARS not supported\n");
     
    421424#endif
    422425
    423     if (!src || (!dst && dstlen))
     426    //Docs say source ptr can't be the same as destination (Windows ME, NT4-SP6)
     427    if (!src || (!dst && dstlen) || ((void *)src == (void *)dst))
    424428    {
    425429        SetLastError( ERROR_INVALID_PARAMETER );
     
    427431    }
    428432
    429     if (srclen == -1) srclen = strlenW(src) + 1;
     433    //Even though the docs claim this only works for -1, testing shows it
     434    //is done for any negative value (Windows ME, NT4 - SP6)
     435    if (srclen <= -1) srclen = strlenW(src) + 1;
    430436
    431437    switch(page)
Note: See TracChangeset for help on using the changeset viewer.