fix for config save, custom value types not written correctly
authorkub <derkub@gmail.com>
Thu, 14 Jan 2021 22:48:08 +0000 (23:48 +0100)
committerkub <derkub@gmail.com>
Fri, 15 Jan 2021 14:03:50 +0000 (15:03 +0100)
platform/common/config_file.c

index e69c3a2..2ebee0a 100644 (file)
@@ -131,7 +131,7 @@ int config_write(const char *fname)
                        }
                }
                else if (me->generate_name != NULL) {
-                       strncpy(line, me->generate_name(0, &dummy), sizeof(line)-1);
+                       strncpy(line, me->generate_name(me->id, &dummy), sizeof(line)-1);
                        line[sizeof(line)-1] = '\0';
                        goto write_line;
                }