aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ext_depends/d2sqlite3
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2022-02-25 19:59:47 -0500
committerRalph Amissah <ralph.amissah@gmail.com>2022-02-25 20:54:19 -0500
commit78a231014be3a76e9e546b31a5e6fa2a9a7b720e (patch)
tree89c64cc66898e20b7f2f81e837df68f265c62757 /src/ext_depends/d2sqlite3
parentverbosity level, "vox_gt[lv]" (voice greater than) (diff)
external dependency update, housekeeping, routine
Diffstat (limited to 'src/ext_depends/d2sqlite3')
-rw-r--r--src/ext_depends/d2sqlite3/source/d2sqlite3/statement.d5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ext_depends/d2sqlite3/source/d2sqlite3/statement.d b/src/ext_depends/d2sqlite3/source/d2sqlite3/statement.d
index 8cf6a38..3b262ab 100644
--- a/src/ext_depends/d2sqlite3/source/d2sqlite3/statement.d
+++ b/src/ext_depends/d2sqlite3/source/d2sqlite3/statement.d
@@ -88,14 +88,15 @@ package(d2sqlite3):
this(Database db, string sql)
{
sqlite3_stmt* handle;
+ enforce(sql.length <= int.max, "Length of SQL statement exceeds `int.max`");
version (_UnlockNotify)
{
- auto result = sqlite3_blocking_prepare_v2(db, sql.toStringz, sql.length.to!int,
+ auto result = sqlite3_blocking_prepare_v2(db, sql.ptr, cast(int) sql.length,
&handle, null);
}
else
{
- auto result = sqlite3_prepare_v2(db.handle(), sql.toStringz, sql.length.to!int,
+ auto result = sqlite3_prepare_v2(db.handle(), sql.ptr, cast(int) sql.length,
&handle, null);
}
enforce(result == SQLITE_OK, new SqliteException(errmsg(db.handle()), result, sql));