aboutsummaryrefslogtreecommitdiffstats
path: root/src/lua
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-01-25 16:16:19 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-01-25 16:16:19 +0000
commit2a81086ec387a9a874900bceed0b0cca2032bdc9 (patch)
tree0e362571841aa0f8dd59009ad4d0b55623f896b7 /src/lua
parent0fa975e21b80eb1423d0bdbcaa825ab01025d6c5 (diff)
downloadrspamd-2a81086ec387a9a874900bceed0b0cca2032bdc9.tar.gz
rspamd-2a81086ec387a9a874900bceed0b0cca2032bdc9.zip
Add lua_sqlite3 unit tests
Diffstat (limited to 'src/lua')
-rw-r--r--src/lua/lua_sqlite3.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lua/lua_sqlite3.c b/src/lua/lua_sqlite3.c
index 34a5a9e19..4442cacab 100644
--- a/src/lua/lua_sqlite3.c
+++ b/src/lua/lua_sqlite3.c
@@ -136,7 +136,7 @@ lua_sqlite3_bind_statements (lua_State *L, gint start, gint end,
gsize slen;
gdouble n;
- g_assert (start < end && start > 0 && end > 0);
+ g_assert (start <= end && start > 0 && end > 0);
for (i = start; i <= end; i ++) {
type = lua_type (L, i);
@@ -194,7 +194,7 @@ lua_sqlite3_sql (lua_State *L)
if (top > 2) {
/* Push additional arguments to sqlite3 */
- lua_sqlite3_bind_statements (L, 2, top, stmt);
+ lua_sqlite3_bind_statements (L, 3, top, stmt);
}
rc = sqlite3_step (stmt);
@@ -305,7 +305,7 @@ lua_sqlite3_rows (lua_State *L)
if (top > 2) {
/* Push additional arguments to sqlite3 */
- lua_sqlite3_bind_statements (L, 2, top, stmt);
+ lua_sqlite3_bind_statements (L, 3, top, stmt);
}
/* Create C closure */