mirror of
https://github.com/cuberite/SQLiteCpp.git
synced 2025-08-04 09:46:02 -04:00
Fix a warning testing return of strncmp
This commit is contained in:
parent
a99d48d3c0
commit
eadd166d75
@ -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
|
// If the "magic string" can't be found then header is invalid, corrupt or unreadable
|
||||||
strncpy(pHeaderStr, pBuf, 16);
|
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);
|
throw SQLite::Exception("Invalid or encrypted SQLite header in file " + aFilename);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user