aboutsummaryrefslogtreecommitdiff
path: root/sqlite3.go
diff options
context:
space:
mode:
authormattn <mattn.jp@gmail.com>2014-08-18 18:48:48 +0900
committermattn <mattn.jp@gmail.com>2014-08-18 18:48:48 +0900
commit72cb8db627c0c5539ab4fda2b866518cd10f1fbf (patch)
tree56ef9724449c49a2d7e15d89e73e824ecdea3ec5 /sqlite3.go
parentMerge branch 'master' of github.com:mattn/go-sqlite3 (diff)
downloadgolite-72cb8db627c0c5539ab4fda2b866518cd10f1fbf.tar.gz
golite-72cb8db627c0c5539ab4fda2b866518cd10f1fbf.tar.xz
Fixed checking parameter count
Diffstat (limited to 'sqlite3.go')
-rw-r--r--sqlite3.go2
1 files changed, 1 insertions, 1 deletions
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])