Add read_u24be etc methods

Fixes #12
This commit is contained in:
Nigel Tao committed 2018-06-02 13:03:24 +10:00
1 parent 9f994948df
commit 20e459cfb2
9 files changed
+195 -72

No files matched your search

+1 -1
View File
@@ -600,7 +600,7 @@ func (g *gen) writeCallSuspendibles(b *buffer, n *a.Expr, depth uint32) error {
}
func (g *gen) writeReadUXX(b *buffer, n *a.Expr, name string, size uint32, endianness string) error {
if size != 16 && size != 32 {
if (size&7 != 0) || (size < 16) || (size > 64) {
return fmt.Errorf("internal error: bad writeReadUXX size %d", size)
}
if endianness != "be" && endianness != "le" {