From 4dfb2ecaf05d066a7fa15e1db0d62d7aa3a81ec5 Mon Sep 17 00:00:00 2001 From: Lars Buitinck Date: Mon, 23 Mar 2015 22:18:23 +0100 Subject: [PATCH] Change strlen(s) > 0 => *s != '\000'. --- sqlite3.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sqlite3.go b/sqlite3.go index 16c29a1..1517280 100644 --- a/sqlite3.go +++ b/sqlite3.go @@ -373,7 +373,7 @@ func (c *SQLiteConn) Prepare(query string) (driver.Stmt, error) { return nil, c.lastError() } var t string - if tail != nil && C.strlen(tail) > 0 { + if tail != nil && *tail != '\000' { t = strings.TrimSpace(C.GoString(tail)) } ss := &SQLiteStmt{c: c, s: s, t: t}