Return value of _vsnprintf and _vswprintf should not be counting the null terminator.
This commit is contained in:
parent
cd8c081ee6
commit
441013770d
|
@ -223,7 +223,7 @@ SHIM_CALL _vsnprintf_shim(
|
|||
}
|
||||
format = end;
|
||||
}
|
||||
*b++ = '\0';
|
||||
*b = '\0';
|
||||
SHIM_SET_RETURN((uint32_t)(b - buffer));
|
||||
}
|
||||
|
||||
|
@ -438,7 +438,7 @@ SHIM_CALL _vswprintf_shim(
|
|||
}
|
||||
format = end;
|
||||
}
|
||||
*b++ = '\0';
|
||||
*b = '\0';
|
||||
|
||||
// swap the result buffer
|
||||
for (wchar_t* swap = buffer; swap != b; ++swap)
|
||||
|
|
Loading…
Reference in New Issue