Fix a potential segfault following OOM error in the test harness. The

SQLite core itself is not at fault.

FossilOrigin-Name: 1bb26695ff28a96d740752e327c2e0a0da1d067e
This commit is contained in:
drh
2014-12-23 20:05:19 +00:00
parent 4a86d00162
commit e5d7bf1e4c
3 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -3670,7 +3670,7 @@ static int test_prepare_v2(
assert(rc==SQLITE_OK || pStmt==0);
Tcl_ResetResult(interp);
if( sqlite3TestErrCode(interp, db, rc) ) return TCL_ERROR;
if( zTail && objc>=5 ){
if( rc==SQLITE_OK && zTail && objc>=5 ){
if( bytes>=0 ){
bytes = bytes - (int)(zTail-zSql);
}