From 4db8f89aace8f04c839b606e15b39fb8383ec732 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Sun, 8 Sep 2019 15:58:42 +0200 Subject: [PATCH] Fixed quaternion array access #942 --- glm/detail/type_quat.inl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/glm/detail/type_quat.inl b/glm/detail/type_quat.inl index 041793df1..d44f494ed 100644 --- a/glm/detail/type_quat.inl +++ b/glm/detail/type_quat.inl @@ -74,14 +74,14 @@ namespace detail GLM_FUNC_QUALIFIER GLM_CONSTEXPR T & qua::operator[](typename qua::length_type i) { assert(i >= 0 && i < this->length()); - return (&w)[i]; + return (&x)[i]; } template GLM_FUNC_QUALIFIER GLM_CONSTEXPR T const& qua::operator[](typename qua::length_type i) const { assert(i >= 0 && i < this->length()); - return (&w)[i]; + return (&x)[i]; } // -- Implicit basic constructors --