Skip to content

Commit

Permalink
go.mod, pe: bump go to 1.22, use reflect.TypeFor
Browse files Browse the repository at this point in the history
Signed-off-by: Aaron Klotz <[email protected]>
  • Loading branch information
dblohm7 committed Aug 1, 2024
1 parent 15336bf commit fc12d7c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/dblohm7/wingoes

go 1.21
go 1.22

require (
github.com/tc-hib/winres v0.2.1
Expand Down
2 changes: 1 addition & 1 deletion pe/pe.go
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ func readStructArray[T any, R rvaType](r peReader, rva R, count int) ([]T, error
if !ok {
return nil, ErrInvalidBinary
}
szT := uint32(reflect.ArrayOf(count, reflect.TypeOf((*T)(nil)).Elem()).Size())
szT := uint32(reflect.ArrayOf(count, reflect.TypeFor[T]()).Size())
if addr2, ok := addOffset(addr, szT); !ok || addr2 >= v.Limit() {
return nil, ErrInvalidBinary
}
Expand Down

0 comments on commit fc12d7c

Please sign in to comment.