From 7a42a4ecb38d022ab01b704995306e453418d17b Mon Sep 17 00:00:00 2001 From: Dimitris Panokostas Date: Thu, 6 Jun 2024 16:08:59 +0200 Subject: [PATCH] bugfix: Fixed crash when saving config files (fixes #1345) --- src/cfgfile.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cfgfile.cpp b/src/cfgfile.cpp index 5b9cbc8b7..59d1a9433 100644 --- a/src/cfgfile.cpp +++ b/src/cfgfile.cpp @@ -2243,7 +2243,7 @@ void cfgfile_save_options (struct zfile *f, struct uae_prefs *p, int type) #ifdef AMIBERRY std::string mode; std::string buffer; - didata* did = &di_joystick[jp->id]; + didata* did = &di_joystick[jp->id - JSEM_JOYS]; // custom options SAVING for (int m = 0; m < 2; ++m)