From 1eaa112a27552a5213351c209af0eb69d7f37ea5 Mon Sep 17 00:00:00 2001 From: Martin Kleusberg Date: Tue, 19 Mar 2013 19:46:56 +0100 Subject: [PATCH] MainWindow: Fix possible endless loop in executeQuery Don't get into an endless loop when there is a syntax error in the SQL statement to execute. --- src/MainWindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index c45aaa2d..3e20ac32 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -765,7 +765,7 @@ void MainWindow::executeQuery() queryResultListModel->setVerticalHeaderLabels(QStringList()); QString queryPart = tail; - int sql3status = sqlite3_prepare_v2(db._db,tail,utf8Query.length(), + sql3status = sqlite3_prepare_v2(db._db,tail,utf8Query.length(), &vm, &tail); if (sql3status == SQLITE_OK){ int rownum = 0;