Skip to content

Instantly share code, notes, and snippets.

@LibretroAdmin
Created November 2, 2022 05:19
Show Gist options
  • Save LibretroAdmin/a68e01ac04a8568f3d84078c945822d3 to your computer and use it in GitHub Desktop.
Save LibretroAdmin/a68e01ac04a8568f3d84078c945822d3 to your computer and use it in GitHub Desktop.
diff --git a/gfx/gfx_thumbnail_path.c b/gfx/gfx_thumbnail_path.c
index b8d239d12d..6579659291 100644
--- a/gfx/gfx_thumbnail_path.c
+++ b/gfx/gfx_thumbnail_path.c
@@ -688,8 +688,11 @@ bool gfx_thumbnail_update_path(
cp = strstr(content_name, ".zip#");
if( cp ) cp[4]=0;
cp = strrchr( content_name,'.');
- strcpy(cp,".png");
- strcpy(thumbnail_path,content_name);
+ if (cp)
+ {
+ strcpy(cp,".png");
+ strcpy(thumbnail_path,content_name);
+ }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment