1
0
mirror of https://github.com/microsoft/DirectXTex synced 2024-11-21 12:00:06 +00:00

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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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;