diff --git a/shell/dbshell.cpp b/shell/dbshell.cpp index 31beac9c3bc..926cb84961d 100644 --- a/shell/dbshell.cpp +++ b/shell/dbshell.cpp @@ -453,7 +453,10 @@ bool isBalanced( string code ) { } break; } - + if (i>=code.size()) { + danglingOp = false; + break; + } if ( isOpSymbol( code[i] )) danglingOp = true; else if (! std::isspace( code[i] )) danglingOp = false; }