mirror of
https://github.com/reactos/syzkaller.git
synced 2025-02-25 22:25:32 +00:00
sys: fix StrConstType size and alignment
The current code is probably a leftover from times when StrConstType itself implied an indirection (it was a pointer to the string). Now strconst it is lowered to PtrType[StrConstType], so its size is len of the string and align is 1. It is not possible to test it now, as it is always used with indirection, so static size and align do not affect struct layout.
This commit is contained in:
parent
2569b613c4
commit
4ae183a783
@ -232,11 +232,11 @@ type StrConstType struct {
|
||||
}
|
||||
|
||||
func (t StrConstType) Size() uintptr {
|
||||
return ptrSize
|
||||
return uintptr(len(t.Val))
|
||||
}
|
||||
|
||||
func (t StrConstType) Align() uintptr {
|
||||
return t.Size()
|
||||
return 1
|
||||
}
|
||||
|
||||
func (t StrConstType) InnerType() Type {
|
||||
|
Loading…
x
Reference in New Issue
Block a user