From 8b3b81ef47d8eaa1f95e152943fd10b03b782034 Mon Sep 17 00:00:00 2001 From: Ben Johnson Date: Tue, 4 Feb 2014 15:30:05 -0700 Subject: Fix quick tests. --- rwtransaction.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'rwtransaction.go') diff --git a/rwtransaction.go b/rwtransaction.go index 7911188..93e544b 100644 --- a/rwtransaction.go +++ b/rwtransaction.go @@ -247,7 +247,10 @@ func (t *RWTransaction) write() error { for _, p := range pages { size := (int(p.overflow) + 1) * t.db.pageSize buf := (*[maxAllocSize]byte)(unsafe.Pointer(p))[:size] - t.db.file.WriteAt(buf, int64(p.id)*int64(t.db.pageSize)) + offset := int64(p.id) * int64(t.db.pageSize) + if _, err := t.db.file.WriteAt(buf, offset); err != nil { + return err + } } return nil -- cgit v1.2.3