1
1
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:
Babz 2023-06-20 23:31:35 +02:00
parent e44f5c00b8
commit 32300a3ffa

View File

@ -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
}