From 2ca1e56e16f03f7afb8988474f3a55e164960665 Mon Sep 17 00:00:00 2001 From: notaz Date: Wed, 22 Nov 2023 00:37:49 +0200 Subject: [PATCH] don't use a stack var out of scope newer compilers are stricter about this, as well as asan --- frontend/main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/frontend/main.c b/frontend/main.c index cec1fbbf..019835dd 100644 --- a/frontend/main.c +++ b/frontend/main.c @@ -590,6 +590,7 @@ int main(int argc, char *argv[]) { char file[MAXPATHLEN] = ""; char path[MAXPATHLEN]; + char isofilename[MAXPATHLEN]; const char *cdfile = NULL; const char *loadst_f = NULL; int psxout = 0; @@ -608,8 +609,6 @@ int main(int argc, char *argv[]) SysPrintf("Using config file %s.\n", cfgfile_basename); } else if (!strcmp(argv[i], "-cdfile")) { - char isofilename[MAXPATHLEN]; - if (i+1 >= argc) break; strncpy(isofilename, argv[++i], MAXPATHLEN); if (isofilename[0] != '/') { -- 2.39.5