From c93d9af97b8eaa9bfbef60db8aa92743949ac3e9 Mon Sep 17 00:00:00 2001 From: "Adam D. Ruppe" Date: Mon, 5 Sep 2016 08:49:49 -0400 Subject: [PATCH] strings arent always zero terminated --- mssql.d | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mssql.d b/mssql.d index 040e58f..ba86d55 100644 --- a/mssql.d +++ b/mssql.d @@ -58,7 +58,7 @@ class MsSql : Database { enforce(returned == SQL_SUCCESS); - returned = SQLExecDirect(statement, cast(ubyte*)sql.ptr, SQL_NTS); + returned = SQLExecDirect(statement, cast(ubyte*)sql.ptr, cast(SQLINTEGER) sql.length); if(returned != SQL_SUCCESS) throw new DatabaseException(getSQLError(SQL_HANDLE_STMT, statement));