mirror of
https://github.com/wader/fq.git
synced 2024-09-11 20:07:11 +03:00
luajit: check binary.Read() error
This commit is contained in:
parent
e44f5c00b8
commit
32300a3ffa
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user