renderer_gl: Fix MakeHandle string-view hazard

`glObjectLabel` expects a null-terminated string, but an `std::string_view` is not necessarily null-terminated
This commit is contained in:
Wunkolo 2026-05-26 09:21:26 -07:00
parent f01b8fcdcd
commit 5e9b2aa33a

View file

@ -112,7 +112,7 @@ static constexpr std::array<FormatTuple, 8> CUSTOM_TUPLES = {{
glTexParameteri(target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); glTexParameteri(target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
if (!debug_name.empty()) { if (!debug_name.empty()) {
glObjectLabel(GL_TEXTURE, texture.handle, -1, debug_name.data()); glObjectLabel(GL_TEXTURE, texture.handle, debug_name.size(), debug_name.data());
} }
return texture; return texture;