Skip to content

Commit

Permalink
FIX: removing trailing CRLF from formed error message on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Oldes committed Jan 2, 2019
1 parent 9110974 commit 9d3d85b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/os/win32/host-lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,8 @@ static void *Task_Ready;
if (!ok) COPY_STR(str, TEXT("unknown error"), len);
else {
COPY_STR(str, lpMsgBuf, len);
len = (int)LEN_STR(str);
if (str[len-2] == '\r' && str[len-1] == '\n') str[len-2] = 0; // trim CRLF
LocalFree(lpMsgBuf);
}
return str;
Expand Down

0 comments on commit 9d3d85b

Please sign in to comment.