Fix xr::details::enumerate<char>

This commit is contained in:
Guillaume Meunier
2024-01-20 13:43:59 +01:00
parent 7f6523fcc0
commit 69560dba65
+5 -1
View File
@@ -90,7 +90,11 @@ auto enumerate(F f, Args &&... args) -> auto
if (XR_SUCCEEDED(result))
{
if constexpr (structure_type<T> == XR_TYPE_UNKNOWN)
if constexpr (std::is_same_v<T, char>)
{
array.resize(count - 1); // count includes the null terminator
}
else if constexpr (structure_type<T> == XR_TYPE_UNKNOWN)
{
array.resize(count);
}