mirror of
https://github.com/aljazceru/turso.git
synced 2026-02-22 16:35:30 +01:00
Fix json_path broken condition
This commit is contained in:
@@ -328,7 +328,9 @@ fn finalize_path<'a>(
|
||||
PPState::InKey => {
|
||||
if key_start < path.len() {
|
||||
let key = &path[key_start..];
|
||||
if key.starts_with('"') & !key.ends_with('"') {
|
||||
if key.starts_with('"') && !key.ends_with('"') && key.len() > 1
|
||||
|| (key.starts_with('"') && key.ends_with('"') && key.len() == 1)
|
||||
{
|
||||
bail_parse_error!("Bad json path: {}", path)
|
||||
}
|
||||
path_components.push(PathElement::Key(Cow::Borrowed(key), false));
|
||||
|
||||
Reference in New Issue
Block a user