Fixed #349; Column throw when constructed with nullptr

This commit is contained in:
Kacperos155
2022-01-26 03:22:17 +01:00
parent 354323a875
commit 10d779a349
5 changed files with 20 additions and 9 deletions

View File

@@ -264,13 +264,13 @@ int Statement::getColumnIndex(const char* apName) const
}
}
const TColumnNames::const_iterator iIndex = mColumnNames.find(apName);
const auto iIndex = mColumnNames.find(apName);
if (iIndex == mColumnNames.end())
{
throw SQLite::Exception("Unknown column name.");
}
return (*iIndex).second;
return iIndex->second;
}
const char * Statement::getColumnDeclaredType(const int aIndex) const