diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-01-25 16:16:19 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-01-25 16:16:19 +0000 |
commit | 2a81086ec387a9a874900bceed0b0cca2032bdc9 (patch) | |
tree | 0e362571841aa0f8dd59009ad4d0b55623f896b7 /src/lua | |
parent | 0fa975e21b80eb1423d0bdbcaa825ab01025d6c5 (diff) | |
download | rspamd-2a81086ec387a9a874900bceed0b0cca2032bdc9.tar.gz rspamd-2a81086ec387a9a874900bceed0b0cca2032bdc9.zip |
Add lua_sqlite3 unit tests
Diffstat (limited to 'src/lua')
-rw-r--r-- | src/lua/lua_sqlite3.c | 6 |
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 */ |