mirror of
https://github.com/Xaymar/obs-StreamFX
synced 2024-12-29 11:01:23 +00:00
gs-effect: Check correct size in get_default_string
This commit is contained in:
parent
8603fef897
commit
b88cc0fe01
1 changed files with 1 additions and 1 deletions
|
@ -737,7 +737,7 @@ void gs::effect_parameter::get_default_string(std::string& v)
|
|||
{
|
||||
if (get_type() != type::String)
|
||||
throw std::bad_cast();
|
||||
size_t ptr_len = gs_effect_get_val_size(_param);
|
||||
size_t ptr_len = gs_effect_get_default_val_size(_param);
|
||||
uint8_t* ptr = static_cast<uint8_t*>(gs_effect_get_default_val(_param));
|
||||
if (ptr) {
|
||||
v = std::string(ptr, ptr + ptr_len);
|
||||
|
|
Loading…
Reference in a new issue