aboutsummaryrefslogtreecommitdiff
path: root/hotline/transaction.go
diff options
context:
space:
mode:
authorJeff Halter <868228+jhalter@users.noreply.github.com>2024-06-16 16:03:54 -0700
committerJeff Halter <868228+jhalter@users.noreply.github.com>2024-06-16 16:05:25 -0700
commit0ed5132769e88cb385b5240986b706430f0ccd72 (patch)
treebd622161546d9db3293ba69afc9646bcdb24b2f4 /hotline/transaction.go
parentf6f1d88969e12eadb7013397cdad3c4c5625988c (diff)
Fix broken io.Reader implementations
Diffstat (limited to 'hotline/transaction.go')
-rw-r--r--hotline/transaction.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/hotline/transaction.go b/hotline/transaction.go
index 7883bfb..39dcd81 100644
--- a/hotline/transaction.go
+++ b/hotline/transaction.go
@@ -214,7 +214,8 @@ func (t *Transaction) Read(p []byte) (int, error) {
bbuf := new(bytes.Buffer)
for _, field := range t.Fields {
- _, err := bbuf.ReadFrom(&field)
+ f := field
+ _, err := bbuf.ReadFrom(&f)
if err != nil {
return 0, fmt.Errorf("error reading field: %w", err)
}