Browse Source

ncd: NCDValue: fix NCDValue_MapFindValueByString(), which got broken when support for strings with nulls was
introduced

ambrop7 14 years ago
parent
commit
91f428cc58
1 changed files with 1 additions and 0 deletions
  1. 1 0
      ncd/NCDValue.c

+ 1 - 0
ncd/NCDValue.c

@@ -608,6 +608,7 @@ NCDValue * NCDValue_MapFindValueByString (NCDValue *o, const char *key_str)
     NCDValue key;
     NCDValue key;
     key.type = NCDVALUE_STRING;
     key.type = NCDVALUE_STRING;
     key.string = (char *)key_str;
     key.string = (char *)key_str;
+    key.string_len = strlen(key_str);
     
     
     NCDValue *ekey = NCDValue_MapFindKey(o, &key);
     NCDValue *ekey = NCDValue_MapFindKey(o, &key);
     if (!ekey) {
     if (!ekey) {