From d7aa0eaf54c660af2a6e31f612904c21d8efa9c0 Mon Sep 17 00:00:00 2001 From: "Eevee (Lexy Munroe)" Date: Fri, 5 May 2017 19:08:46 -0700 Subject: [PATCH] Core: Fix maximum length of INI section names It was a generous 128, but the inih library has its own maximum length of 50. Any longer keys were truncated by inih, so they appeared to be missing when mgba tried to read the longer key again later. This was causing the configuration for my Nintendo Wii Remote Pro Controller to be effectively lost; the key name ended up at 53 characters. Arguably inih should truncate when reading, too, but... --- src/core/input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/input.c b/src/core/input.c index 4614e3549..f1fa3818f 100644 --- a/src/core/input.c +++ b/src/core/input.c @@ -10,7 +10,7 @@ #include -#define SECTION_NAME_MAX 128 +#define SECTION_NAME_MAX 50 #define KEY_NAME_MAX 32 #define KEY_VALUE_MAX 16 #define AXIS_INFO_MAX 12