[PATCH] msvcrt: Implement _wperror (v2)

Hugh McMaster hugh.mcmaster at outlook.com
Tue Jun 21 08:17:22 CDT 2016


On Tuesday, 21 June 2016 10:58 PM, Piotr Caban wrote:
>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.

Other than checking for a return value of -1 and freeing the buffer, 
is there any other error handling needed?

MSDN says errno is set to EILSEQ on failure, but I'm assuming MSVCRT_wcstombs does
this by itself.

Thanks,
Hugh


More information about the wine-devel mailing list