1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2024-11-08 08:47:17 +01:00

Fix the range checks for column indexes in the SQLite module.

This commit is contained in:
Sandu Liviu Catalin 2016-08-25 23:50:11 +03:00
parent 11d5cff63b
commit e02014088b
2 changed files with 2 additions and 2 deletions

View File

@ -88,7 +88,7 @@ Int32 StmtHnd::GetColumnIndex(CSStr name)
for (Int32 i = 0; i < mColumns; ++i)
{
// Get the column name at the current index
CSStr name = (CSStr)sqlite3_column_name(mPtr, i);
CSStr name = static_cast< CSStr >(sqlite3_column_name(mPtr, i));
// Validate the name
if (!name)
{

View File

@ -94,7 +94,7 @@ public:
*/
bool CheckColumn(Int32 idx) const
{
return (idx >= 0) && (idx <= mColumns);
return (idx >= 0) && (idx < mColumns);
}
/* --------------------------------------------------------------------------------------------