mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2025-01-31 09:57:14 +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)
|
for (Int32 i = 0; i < mColumns; ++i)
|
||||||
{
|
{
|
||||||
// Get the column name at the current index
|
// 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
|
// Validate the name
|
||||||
if (!name)
|
if (!name)
|
||||||
{
|
{
|
||||||
|
@ -94,7 +94,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
bool CheckColumn(Int32 idx) const
|
bool CheckColumn(Int32 idx) const
|
||||||
{
|
{
|
||||||
return (idx >= 0) && (idx <= mColumns);
|
return (idx >= 0) && (idx < mColumns);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* --------------------------------------------------------------------------------------------
|
/* --------------------------------------------------------------------------------------------
|
||||||
|
Loading…
x
Reference in New Issue
Block a user