From 9d317c3794ddb9cba20a978a68ef7da6429a0f45 Mon Sep 17 00:00:00 2001 From: Christopher Dunn Date: Wed, 22 Jun 2011 08:30:21 +0000 Subject: [PATCH] bug#3306345: minor typo in Path::resolve() -- missing bang. --- src/lib_json/json_value.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib_json/json_value.cpp b/src/lib_json/json_value.cpp index fc809ce..3ba36fe 100644 --- a/src/lib_json/json_value.cpp +++ b/src/lib_json/json_value.cpp @@ -1840,7 +1840,7 @@ Path::resolve( const Value &root ) const const PathArgument &arg = *it; if ( arg.kind_ == PathArgument::kindIndex ) { - if ( !node->isArray() || node->isValidIndex( arg.index_ ) ) + if ( !node->isArray() || !node->isValidIndex( arg.index_ ) ) { // Error: unable to resolve path (array value expected at position... } @@ -1873,7 +1873,7 @@ Path::resolve( const Value &root, const PathArgument &arg = *it; if ( arg.kind_ == PathArgument::kindIndex ) { - if ( !node->isArray() || node->isValidIndex( arg.index_ ) ) + if ( !node->isArray() || !node->isValidIndex( arg.index_ ) ) return defaultValue; node = &((*node)[arg.index_]); }