From f4a20870c77026441b7e75344dcafc63f1e5d27f Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 18 Jan 2021 20:30:21 +0100 Subject: [PATCH] video_shader_write_referenced_preset - logic flaw - loaded_shader_preset_path is a character array - conditional boolean check would always evaluate to true - check if string is empty instead --- gfx/video_shader_parse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gfx/video_shader_parse.c b/gfx/video_shader_parse.c index 26cbf65fff..cf402789be 100644 --- a/gfx/video_shader_parse.c +++ b/gfx/video_shader_parse.c @@ -1016,7 +1016,7 @@ bool video_shader_write_referenced_preset(const char *path_to_save, fill_pathname_application_special(config_dir, PATH_MAX_LENGTH, APPLICATION_SPECIAL_DIRECTORY_CONFIG); /* If there is no initial preset path loaded */ - if (!shader->loaded_preset_path) + if (string_is_empty(shader->loaded_preset_path)) { RARCH_WARN("[ Shaders ]: Saving Full Preset because the loaded Shader does not have " "a path to a previously loaded preset file on disk.\n");