mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2025-10-15 15:37:20 +02:00
Fix query string validation in SQLite statement handle.
This commit is contained in:
@@ -51,9 +51,9 @@ void StmtHnd::Create(CSStr query, SQInteger length)
|
|||||||
STHROWF("Unable to prepare statement. Invalid connection handle");
|
STHROWF("Unable to prepare statement. Invalid connection handle");
|
||||||
}
|
}
|
||||||
// Is the specified query string valid?
|
// Is the specified query string valid?
|
||||||
else if (!query || *query || !length)
|
else if (!query || !length || *query == '\0')
|
||||||
{
|
{
|
||||||
STHROWF("Unable to prepare statement. Invalid query string");
|
STHROWF("Unable to prepare statement. Invalid or empty query string");
|
||||||
}
|
}
|
||||||
// Save the query string
|
// Save the query string
|
||||||
mQuery.assign(query, length);
|
mQuery.assign(query, length);
|
||||||
|
Reference in New Issue
Block a user