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:
parent
11d5cff63b
commit
e02014088b
@ -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)
|
||||
{
|
||||
|
@ -94,7 +94,7 @@ public:
|
||||
*/
|
||||
bool CheckColumn(Int32 idx) const
|
||||
{
|
||||
return (idx >= 0) && (idx <= mColumns);
|
||||
return (idx >= 0) && (idx < mColumns);
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user