diff options
Diffstat (limited to 'vendor/github.com/ncruces/go-sqlite3/internal')
-rw-r--r-- | vendor/github.com/ncruces/go-sqlite3/internal/alloc/alloc_unix.go | 2 | ||||
-rw-r--r-- | vendor/github.com/ncruces/go-sqlite3/internal/alloc/alloc_windows.go | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/vendor/github.com/ncruces/go-sqlite3/internal/alloc/alloc_unix.go b/vendor/github.com/ncruces/go-sqlite3/internal/alloc/alloc_unix.go index 39a3a38cc..009cc1f0b 100644 --- a/vendor/github.com/ncruces/go-sqlite3/internal/alloc/alloc_unix.go +++ b/vendor/github.com/ncruces/go-sqlite3/internal/alloc/alloc_unix.go @@ -39,7 +39,7 @@ type mmappedMemory struct { func (m *mmappedMemory) Reallocate(size uint64) []byte { com := uint64(len(m.buf)) res := uint64(cap(m.buf)) - if com < size && size < res { + if com < size && size <= res { // Round up to the page size. rnd := uint64(unix.Getpagesize() - 1) new := (size + rnd) &^ rnd diff --git a/vendor/github.com/ncruces/go-sqlite3/internal/alloc/alloc_windows.go b/vendor/github.com/ncruces/go-sqlite3/internal/alloc/alloc_windows.go index 27d875f2e..62d499649 100644 --- a/vendor/github.com/ncruces/go-sqlite3/internal/alloc/alloc_windows.go +++ b/vendor/github.com/ncruces/go-sqlite3/internal/alloc/alloc_windows.go @@ -48,7 +48,7 @@ type virtualMemory struct { func (m *virtualMemory) Reallocate(size uint64) []byte { com := uint64(len(m.buf)) res := uint64(cap(m.buf)) - if com < size && size < res { + if com < size && size <= res { // Round up to the page size. rnd := uint64(windows.Getpagesize() - 1) new := (size + rnd) &^ rnd |