On 06/21/16 14:42, Hugh McMaster wrote: > + size = MSVCRT_wcstombs(NULL, str, 0) + 1; > + buffer = MSVCRT_malloc(size); > + if (!buffer) return; > + MSVCRT_wcstombs(buffer, str, size); Please handle MSVCRT_wcstombs failure. Thanks, Piotr