mirror of
https://github.com/libretro/RetroArch
synced 2025-03-13 07:14:43 +00:00
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);
|
||||
if (!string_is_empty(preset_path))
|
||||
{
|
||||
strlcpy(runloop_st->runtime_shader_preset_path, preset_path,
|
||||
sizeof(runloop_st->runtime_shader_preset_path));
|
||||
if (runloop_st->runtime_shader_preset_path != preset_path)
|
||||
strlcpy(runloop_st->runtime_shader_preset_path, preset_path,
|
||||
sizeof(runloop_st->runtime_shader_preset_path));
|
||||
#ifdef HAVE_MENU
|
||||
/* reflect in shader manager */
|
||||
if (menu_shader_manager_set_preset(
|
||||
|
Loading…
x
Reference in New Issue
Block a user