Fix incorrect check for case insensitive key lookup (#824)

This commit is contained in:
Nong Li 2020-04-29 10:55:28 -07:00 committed by GitHub
parent f0d5337818
commit 0f9dbf84b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -688,7 +688,7 @@ inline simdjson_result<element> object::at_key_case_insensitive(const std::strin
if (key.length() == field_key.length()) {
bool equal = true;
for (size_t i=0; i<field_key.length(); i++) {
equal = equal && std::tolower(key[i]) != std::tolower(field_key[i]);
equal = equal && std::tolower(key[i]) == std::tolower(field_key[i]);
}
if (equal) { return field.value(); }
}