From 67099c2b238735ceb2267720144ab34c2f6bfd48 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Fri, 19 Jan 2018 20:44:41 +0100 Subject: [PATCH] gs-effect: Fix assigning of Integer and Float arrays --- source/gs-effect.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/gs-effect.cpp b/source/gs-effect.cpp index bc1d0b52..9a743410 100644 --- a/source/gs-effect.cpp +++ b/source/gs-effect.cpp @@ -201,7 +201,7 @@ void GS::EffectParameter::SetFloat4(float_t x, float_t y, float_t z, float_t w) } void GS::EffectParameter::SetFloatArray(float_t v[], size_t sz) { - if (GetType() != Type::Float) + if ((GetType() != Type::Float) && (GetType() != Type::Float2) && (GetType() != Type::Float3) && (GetType() != Type::Float4)) throw std::bad_cast(); gs_effect_set_val(m_param, v, sz); } @@ -234,7 +234,7 @@ void GS::EffectParameter::SetInteger4(int32_t x, int32_t y, int32_t z, int32_t w } void GS::EffectParameter::SetIntegerArray(int32_t v[], size_t sz) { - if (GetType() != Type::Integer) + if ((GetType() != Type::Integer) && (GetType() != Type::Integer2) && (GetType() != Type::Integer3) && (GetType() != Type::Integer4)) throw std::bad_cast(); gs_effect_set_val(m_param, v, sz); }