diff options
author | Přemysl Eric Janouch <p@janouch.name> | 2024-12-16 09:09:03 +0100 |
---|---|---|
committer | Přemysl Eric Janouch <p@janouch.name> | 2024-12-16 09:09:03 +0100 |
commit | 32cbb152660566042ac25b00de4b19b1c90c0f5c (patch) | |
tree | 82fbbd3e655386aabb2e3bd4911c2c537e44212e /liberty.c | |
parent | 149938cc445f99b1aa40c490014aad72cf698dec (diff) | |
download | liberty-32cbb152660566042ac25b00de4b19b1c90c0f5c.tar.gz liberty-32cbb152660566042ac25b00de4b19b1c90c0f5c.tar.xz liberty-32cbb152660566042ac25b00de4b19b1c90c0f5c.zip |
Serialize integer-ish config keys properly
Diffstat (limited to 'liberty.c')
-rw-r--r-- | liberty.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -4833,7 +4833,8 @@ config_item_write_kv_pair (struct config_writer *self, str_append_printf (self->output, "%s# %s\n", indent, value->schema->comment); - bool can_use_word = true; + char *end = NULL; + bool can_use_word = ((void) strtoll (key, &end, 10), end == key); for (const char *p = key; *p; p++) if (!config_tokenizer_is_word_char (*p)) can_use_word = false; |