summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
Diffstat (limited to 'shell')
-rw-r--r--shell/dbshell.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/shell/dbshell.cpp b/shell/dbshell.cpp
index 93d5828a5d0..6f5df237176 100644
--- a/shell/dbshell.cpp
+++ b/shell/dbshell.cpp
@@ -178,9 +178,9 @@ bool isBalanced( string code ){
}
continue;
case '{': brackets++; break;
- case '}': brackets--; break;
+ case '}': if ( brackets <= 0 ) return true; brackets--; break;
case '(': parens++; break;
- case ')': parens--; break;
+ case ')': if ( parens <= 0 ) return true; parens--; break;
case '"':
i++;
while ( i < code.size() && code[i] != '"' ) i++;