Skip to content

Commit ea383e6

Browse files
committed
Fix array length bug
1 parent f5d7cc3 commit ea383e6

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

gen/size.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ func fixedsizeExpr(e Elem) (string, bool) {
235235
switch e := e.(type) {
236236
case *Array:
237237
if str, ok := fixedsizeExpr(e.Els); ok {
238-
return fmt.Sprintf("(%s * (%s))", e.Size, str), true
238+
return fmt.Sprintf("(int(%s) * (%s))", e.Size, str), true
239239
}
240240
case *BaseElem:
241241
if fixedSize(e.Value) {

hsp/hsp

122 KB
Binary file not shown.

0 commit comments

Comments
 (0)