From 8603fef8979c48375da3c9a57f415d6d7d0a018b Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Wed, 7 Aug 2019 16:41:26 +0200 Subject: [PATCH] gs-effect: Fix get_string and get_default_string --- source/obs/gs/gs-effect.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/obs/gs/gs-effect.cpp b/source/obs/gs/gs-effect.cpp index 2b158d65..dfea8ed9 100644 --- a/source/obs/gs/gs-effect.cpp +++ b/source/obs/gs/gs-effect.cpp @@ -721,7 +721,7 @@ void gs::effect_parameter::set_string(std::string const& v) void gs::effect_parameter::get_string(std::string& v) { - if (get_type() != type::Matrix) + if (get_type() != type::String) throw std::bad_cast(); size_t ptr_len = gs_effect_get_val_size(_param); uint8_t* ptr = static_cast(gs_effect_get_val(_param)); @@ -735,7 +735,7 @@ void gs::effect_parameter::get_string(std::string& v) void gs::effect_parameter::get_default_string(std::string& v) { - if (get_type() != type::Matrix) + if (get_type() != type::String) throw std::bad_cast(); size_t ptr_len = gs_effect_get_val_size(_param); uint8_t* ptr = static_cast(gs_effect_get_default_val(_param));