mirror of
https://github.com/curl/curl.git
synced 2025-01-30 14:22:33 +08:00
tool_cb_wrt: fix debug assertion
- Fix off-by-one out-of-bounds array index in Windows debug assertion. Bug: https://github.com/curl/curl/commit/af3f4e41#r127212213 Reported-by: Gisle Vanem
This commit is contained in:
parent
291d225a50
commit
73980f9ace
@ -287,7 +287,7 @@ size_t tool_write_cb(char *buffer, size_t sz, size_t nmemb, void *userdata)
|
||||
|
||||
if(MultiByteToWideChar(CP_UTF8, 0, (LPCSTR)outs->utf8seq, -1,
|
||||
prefix, sizeof(prefix)/sizeof(prefix[0]))) {
|
||||
DEBUGASSERT(prefix[3] == L'\0');
|
||||
DEBUGASSERT(prefix[2] == L'\0');
|
||||
if(!WriteConsoleW(
|
||||
(HANDLE) fhnd,
|
||||
prefix,
|
||||
|
Loading…
Reference in New Issue
Block a user