Skip to content

Commit

Permalink
fcmp: Fix bogus "query failed" message
Browse files Browse the repository at this point in the history
When the modpack installer updates an already installed modpack, it
emits a bogus critical message that a query failed with error code 100.

Error code 100 is `SQLITE_ROW` and is not really an error, but signals
that a data row has been successfully read. `SQLITE_ROW` is also an
expected return value in `mpdb_update_modpack`.

Change the check for failed to queries to ignore `SQLITE_ROW`.
  • Loading branch information
blabber committed Feb 16, 2024
1 parent b132bb0 commit 5bf53ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/fcmp/mpdb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ static int mpdb_query(sqlite3 *handle, const char *query)
ret = sqlite3_finalize(stmt);
}

if (ret != SQLITE_OK) {
if (ret != SQLITE_OK && ret != SQLITE_ROW) {
qCritical("Query \"%s\" failed. (%d)", query, ret);
}

Expand Down

0 comments on commit 5bf53ad

Please sign in to comment.