bx::Error::getMessage() returns by value: the message is a local before %S. Closes #4115. (#4116)

This commit is contained in:
Branimir Karadžić
2026-11-04 22:17:54 +00:00
committed by GitHub
parent 00a1927c1f
commit fddd700569
2 changed files with 7 additions and 3 deletions
+4 -2
View File
@@ -1477,7 +1477,8 @@ void associate()
}
else
{
bx::printf("Failed to associate MIME type image/%S (error: \"%S\")!\n", &_ext, &err.getMessage() );
const bx::StringLiteral msg = err.getMessage();
bx::printf("Failed to associate MIME type image/%S (error: \"%S\")!\n", &_ext, &msg);
}
bx::stringPrintf(mimeType, "image/%S;", &_ext);
@@ -1514,7 +1515,8 @@ void associate()
}
else
{
bx::printf("Failed to create texturev desktop entry (error: \"%S\")! Permissions (try sudo)?!\n", &err.getMessage() );
const bx::StringLiteral msg = err.getMessage();
bx::printf("Failed to create texturev desktop entry (error: \"%S\")! Permissions (try sudo)?!\n", &msg);
}
#endif // BX_PLATFORM_WINDOWS
}