Skip to content

Commit ffc0202

Browse files
committed
Use a nil pointer is entry is ""
1 parent 7205526 commit ffc0202

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

sqlite3_load_extension.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,11 @@ func (c *SQLiteConn) LoadExtension(lib string, entry string) error {
5050
return errors.New(C.GoString(C.sqlite3_errmsg(c.db)))
5151
}
5252

53-
if err := c.loadExtension(lib, &entry); err != nil {
53+
var ptr *string
54+
if entry != "" {
55+
ptr = &entry
56+
}
57+
if err := c.loadExtension(lib, ptr); err != nil {
5458
C.sqlite3_enable_load_extension(c.db, 0)
5559
return err
5660
}

0 commit comments

Comments
 (0)