aboutsummaryrefslogtreecommitdiffstats
path: root/sysgen
diff options
context:
space:
mode:
authorAndrey Konovalov <andreyknvl@google.com>2017-01-19 20:23:57 +0100
committerAndrey Konovalov <andreyknvl@google.com>2017-01-19 20:46:26 +0100
commit243c4bf89cf66d2cda30d27850eb48bb82eb0863 (patch)
treefc56f09dd143dc1e1a76315dac0f5f944abfdbb1 /sysgen
parent8625843eebe2785991094745197d5412be294527 (diff)
prog: fix bytesizeN for nonarray fields
Diffstat (limited to 'sysgen')
-rw-r--r--sysgen/sysgen.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/sysgen/sysgen.go b/sysgen/sysgen.go
index da855d6a2..867561ad7 100644
--- a/sysgen/sysgen.go
+++ b/sysgen/sysgen.go
@@ -731,7 +731,7 @@ func decodeIntType(typ string) (uint64, bool, uint64) {
sz, _ = strconv.ParseInt(typ[3:], 10, 64)
}
- if bitfieldLen >= uint64(sz) {
+ if bitfieldLen > uint64(sz) {
failf("bitfield of size %v is too large for base type of size %v", bitfieldLen, sz/8)
}