[PATCH] libs/wine/string.c: Always return (int)written
hugh.mcmaster at outlook.com
Wed Dec 17 05:47:05 CST 2014
Both GCC and Windows versions of vsnprintf return the number of chars that would be written to a given buffer when vsnprintf(NULL, 0, fmt, va_args) is called.
Wine currently returns -1, which is incorrect.
Also, if there is a short buffer, that is, buffer <= len, not only is any output truncated, but the return value is the number of chars that would be written if the buffer had sufficient space.
Here, Wine returns -1, which is, again, incorrect.
In all cases, the return value should be the number of chars written or the number of chars that would be written if the buffer has sufficient space.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 792 bytes
Desc: not available
More information about the wine-patches