mirror of
https://github.com/transmission/transmission
synced 2024-12-23 08:13:27 +00:00
Fix tr_net_strerror
on Windows (oops)
This commit is contained in:
parent
79195614b2
commit
6cbfcdc85e
1 changed files with 1 additions and 1 deletions
|
@ -75,7 +75,7 @@ tr_net_strerror (char * buf, size_t buflen, int err)
|
|||
{
|
||||
*buf = '\0';
|
||||
#ifdef _WIN32
|
||||
FormatMessageA (FORMAT_MESSAGE_FROM_SYSTEM, NULL, err, 0, buf, buflen, NULL);
|
||||
DWORD len = FormatMessageA (FORMAT_MESSAGE_FROM_SYSTEM, NULL, err, 0, buf, buflen, NULL);
|
||||
while (len > 0 && buf[len - 1] >= '\0' && buf[len - 1] <= ' ')
|
||||
buf[--len] = '\0';
|
||||
#else
|
||||
|
|
Loading…
Reference in a new issue