summaryrefslogtreecommitdiffstats
path: root/src/map.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map.c')
-rw-r--r--src/map.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/map.c b/src/map.c
index e8fe476..5310479 100644
--- a/src/map.c
+++ b/src/map.c
@@ -454,6 +454,12 @@ map_data_set_entry(struct plugin_state *state,
struct map *map;
struct entry *entry;
map = map_data_find_map(state, domain_name, map_name);
+ if (key_len == (unsigned int) -1) {
+ key_len = strlen(key);
+ }
+ if (value_len == (unsigned int) -1) {
+ value_len = strlen(value);
+ }
if (map != NULL) {
entry = map_data_find_map_entry_id(state, map, id);
if (entry != NULL) {