mirror of
https://github.com/allankoechke/SQLiteCpp.git
synced 2026-12-02 17:11:59 +00:00
Fix a warning testing return of strncmp
This commit is contained in:
@@ -310,7 +310,7 @@ Header Database::getHeaderInfo(const std::string& aFilename)
|
||||
|
||||
// If the "magic string" can't be found then header is invalid, corrupt or unreadable
|
||||
strncpy(pHeaderStr, pBuf, 16);
|
||||
if (!strncmp(pHeaderStr, "SQLite format 3", 15) == 0)
|
||||
if (strncmp(pHeaderStr, "SQLite format 3", 15) != 0)
|
||||
{
|
||||
throw SQLite::Exception("Invalid or encrypted SQLite header in file " + aFilename);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user