tex tools: remove newlines from FORMAT_MESSAGE_FROM_SYSTEM (#355)

This commit is contained in:
Chuck Walbourn
2023-05-17 11:38:08 -07:00
committed by GitHub
parent f5d41447f8
commit d664193c05
3 changed files with 24 additions and 0 deletions

View File

@@ -752,6 +752,14 @@ namespace
if (errorText)
LocalFree(errorText);
for (wchar_t* ptr = desc; *ptr != 0; ++ptr)
{
if (*ptr == L'\r' || *ptr == L'\n')
{
*ptr = L' ';
}
}
}
return desc;

View File

@@ -1047,6 +1047,14 @@ namespace
if (errorText)
LocalFree(errorText);
for (wchar_t* ptr = desc; *ptr != 0; ++ptr)
{
if (*ptr == L'\r' || *ptr == L'\n')
{
*ptr = L' ';
}
}
}
return desc;

View File

@@ -751,6 +751,14 @@ namespace
if (errorText)
LocalFree(errorText);
for(wchar_t* ptr = desc; *ptr != 0; ++ptr)
{
if (*ptr == L'\r' || *ptr == L'\n')
{
*ptr = L' ';
}
}
}
return desc;