From 13fab97ccf3297292728cca2d356339cc8e5ee5a Mon Sep 17 00:00:00 2001 From: retro-wertz Date: Sat, 3 Aug 2019 08:35:12 +0800 Subject: Silence warning -Wformat-overflow - Increasing the maximum size of destination char array to x2 to silence this warning. --- libpcsxcore/plugins.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libpcsxcore/plugins.c') diff --git a/libpcsxcore/plugins.c b/libpcsxcore/plugins.c index 4f52ed2..0c2b190 100644 --- a/libpcsxcore/plugins.c +++ b/libpcsxcore/plugins.c @@ -1064,7 +1064,7 @@ void CALLBACK clearDynarec(void) { int LoadPlugins() { int ret; - char Plugin[MAXPATHLEN]; + char Plugin[MAXPATHLEN * 2]; ReleasePlugins(); SysLibError(); @@ -1169,7 +1169,7 @@ int ReloadCdromPlugin() if (UsingIso()) { LoadCDRplugin(NULL); } else { - char Plugin[MAXPATHLEN]; + char Plugin[MAXPATHLEN * 2]; sprintf(Plugin, "%s/%s", Config.PluginsDir, Config.Cdr); if (LoadCDRplugin(Plugin) == -1) return -1; } -- cgit v1.2.3 From e6f1e7f70c3ee3816e417f97aef1501a1f950976 Mon Sep 17 00:00:00 2001 From: retro-wertz Date: Sat, 3 Aug 2019 20:56:36 +0800 Subject: Silence a few more warnings - silence a few more truncated warnings - change "disable" to "disabled" in core options --- libpcsxcore/plugins.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libpcsxcore/plugins.c') diff --git a/libpcsxcore/plugins.c b/libpcsxcore/plugins.c index 0c2b190..af7ebed 100644 --- a/libpcsxcore/plugins.c +++ b/libpcsxcore/plugins.c @@ -1182,7 +1182,7 @@ void SetIsoFile(const char *filename) { IsoFile[0] = '\0'; return; } - strncpy(IsoFile, filename, MAXPATHLEN); + strncpy(IsoFile, filename, MAXPATHLEN - 1); } const char *GetIsoFile(void) { -- cgit v1.2.3