Avoid calling strlcpy when copying string onto itself (#17031)
This commit is contained in:
parent
c90f7aba6c
commit
10a1154b06
|
@ -3033,8 +3033,9 @@ bool video_shader_apply_shader(
|
||||||
configuration_set_bool(settings, settings->bools.video_shader_enable, true);
|
configuration_set_bool(settings, settings->bools.video_shader_enable, true);
|
||||||
if (!string_is_empty(preset_path))
|
if (!string_is_empty(preset_path))
|
||||||
{
|
{
|
||||||
strlcpy(runloop_st->runtime_shader_preset_path, preset_path,
|
if (runloop_st->runtime_shader_preset_path != preset_path)
|
||||||
sizeof(runloop_st->runtime_shader_preset_path));
|
strlcpy(runloop_st->runtime_shader_preset_path, preset_path,
|
||||||
|
sizeof(runloop_st->runtime_shader_preset_path));
|
||||||
#ifdef HAVE_MENU
|
#ifdef HAVE_MENU
|
||||||
/* reflect in shader manager */
|
/* reflect in shader manager */
|
||||||
if (menu_shader_manager_set_preset(
|
if (menu_shader_manager_set_preset(
|
||||||
|
|
Loading…
Reference in New Issue