win: fix compilation with VS < 2012
PR-URL: https://github.com/libuv/libuv/pull/554 Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
This commit is contained in:
parent
037a8ab29f
commit
764877fd9e
@ -28,10 +28,11 @@
|
||||
* on overflow...
|
||||
*/
|
||||
int snprintf(char* buf, size_t len, const char* fmt, ...) {
|
||||
int n;
|
||||
va_list ap;
|
||||
va_start(ap, fmt);
|
||||
|
||||
int n = _vscprintf(fmt, ap);
|
||||
n = _vscprintf(fmt, ap);
|
||||
vsnprintf_s(buf, len, _TRUNCATE, fmt, ap);
|
||||
|
||||
va_end(ap);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user