13 Mar
2014
13 Mar
'14
3:32 p.m.
Piotr Caban <piotr(a)codeweavers.com> writes:
+ if(!MultiByteToWideChar(locinfo->lc_codepage, + MB_ERR_INVALID_CHARS, (char*)str, p-str, &wide, 1)) + return c; + + lower = tolowerW(wide); + if(lower == wide) + return str[0] + (str[1]<<8); + + WideCharToMultiByte(locinfo->lc_codepage, 0, + &lower, 1, (char*)str, 2, NULL, NULL);
You should probably also check the resulting length here. -- Alexandre Julliard julliard(a)winehq.org