Skip to content

Commit eadd166

Browse files
committed
Fix a warning testing return of strncmp
1 parent a99d48d commit eadd166

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Database.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ Header Database::getHeaderInfo(const std::string& aFilename)
310310

311311
// If the "magic string" can't be found then header is invalid, corrupt or unreadable
312312
strncpy(pHeaderStr, pBuf, 16);
313-
if (!strncmp(pHeaderStr, "SQLite format 3", 15) == 0)
313+
if (strncmp(pHeaderStr, "SQLite format 3", 15) != 0)
314314
{
315315
throw SQLite::Exception("Invalid or encrypted SQLite header in file " + aFilename);
316316
}

0 commit comments

Comments
 (0)