summaryrefslogtreecommitdiff
path: root/vendor/github.com/ncruces/go-sqlite3/internal/util/mem.go
diff options
context:
space:
mode:
authorLibravatar kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com>2025-04-04 15:34:38 +0000
committerLibravatar GitHub <noreply@github.com>2025-04-04 17:34:38 +0200
commitdb4b85715966ee590c6cdff5cc52e592b66e3d17 (patch)
tree83642d3afe51fbe279e36a9a6c9069f785a0adeb /vendor/github.com/ncruces/go-sqlite3/internal/util/mem.go
parent[bugfix] Fix Atkinson Hyperlegible font embedding on Ecks Pee theme. (#3964) (diff)
downloadgotosocial-db4b85715966ee590c6cdff5cc52e592b66e3d17.tar.xz
[chore] bump ncruces/go-sqlite3 to v0.25.0 (#3966)
Diffstat (limited to 'vendor/github.com/ncruces/go-sqlite3/internal/util/mem.go')
-rw-r--r--vendor/github.com/ncruces/go-sqlite3/internal/util/mem.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/vendor/github.com/ncruces/go-sqlite3/internal/util/mem.go b/vendor/github.com/ncruces/go-sqlite3/internal/util/mem.go
index d2fea08b4..90c0e9e54 100644
--- a/vendor/github.com/ncruces/go-sqlite3/internal/util/mem.go
+++ b/vendor/github.com/ncruces/go-sqlite3/internal/util/mem.go
@@ -135,11 +135,10 @@ func ReadString(mod api.Module, ptr Ptr_t, maxlen int64) string {
panic(RangeErr)
}
}
- if i := bytes.IndexByte(buf, 0); i < 0 {
- panic(NoNulErr)
- } else {
+ if i := bytes.IndexByte(buf, 0); i >= 0 {
return string(buf[:i])
}
+ panic(NoNulErr)
}
func WriteBytes(mod api.Module, ptr Ptr_t, b []byte) {