diff options
-rw-r--r-- | src/til_settings.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/til_settings.c b/src/til_settings.c index 7bd39c3..0a1a3d5 100644 --- a/src/til_settings.c +++ b/src/til_settings.c @@ -563,13 +563,13 @@ int til_settings_label_setting(const til_settings_t *settings, const til_setting */ for (unsigned i = 0; i < settings->num; i++) { if (settings->entries[i] == setting) { - size_t len = snprintf(NULL, 0, "%s[%u]", settings->label, i) + 1; + size_t len = snprintf(NULL, 0, "[%u]", i) + 1; label = calloc(1, len); if (!label) return -ENOMEM; - snprintf(label, len, "%s[%u]", settings->label, i); + snprintf(label, len, "[%u]", i); *res_label = label; return 0; |