Skip to content

Commit

Permalink
luajit: check binary.Read() error
Browse files Browse the repository at this point in the history
  • Loading branch information
dlatchx committed Jun 20, 2023
1 parent e44f5c0 commit 32300a3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion format/luajit/luajit.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ func u64tof64(u uint64) float64 {
binary.BigEndian.PutUint64(buf[:], u)

var f float64
binary.Read(bytes.NewBuffer(buf[:]), binary.BigEndian, &f)
err := binary.Read(bytes.NewBuffer(buf[:]), binary.BigEndian, &f)
if err != nil {
panic(err)
}

return f
}
Expand Down

0 comments on commit 32300a3

Please sign in to comment.