Ignore:
Timestamp:
Jun 25, 2002, 9:10:02 AM (23 years ago)
Author:
sandervl
Message:

KSO: Fancy 16 step fallthru case isn't cool if the src length is bad.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kernel32/unicode/mbtowc.c

    r5450 r8752  
    5858    }
    5959
     60    #ifndef __WIN32OS2__
    6061    for (;;)
    6162    {
     
    8687        srclen -= 16;
    8788    }
     89    #else
     90    /* kso: The above code isn't that cool when srclen is bad.
     91     *      This might be a little bit slower but way safer!
     92     */
     93    ret = 1;                            /* seems to be 1 based, at least the code is... */
     94    while (*src && srclen--)
     95        *dst++ = cp2uni[*src++], ret++;
     96    return ret - srclen;
     97    #endif
    8898}
    8999
Note: See TracChangeset for help on using the changeset viewer.