From 72cb8db627c0c5539ab4fda2b866518cd10f1fbf Mon Sep 17 00:00:00 2001 From: mattn Date: Mon, 18 Aug 2014 18:48:48 +0900 Subject: [PATCH] Fixed checking parameter count --- sqlite3.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sqlite3.go b/sqlite3.go index e2ad600..3595545 100644 --- a/sqlite3.go +++ b/sqlite3.go @@ -164,7 +164,7 @@ func (c *SQLiteConn) Exec(query string, args []driver.Value) (driver.Result, err var res driver.Result if s.(*SQLiteStmt).s != nil { na := s.NumInput() - if na < len(args) { + if len(args) < na { return nil, errors.New("args is not enough to execute query") } res, err = s.Exec(args[:na])