cmd/gomobile: fix header padding computation in apk generation
fix file data align to 4 Change-Id: Ie88c46521e216b3f83a8dc3495591cd19bce83c6 GitHub-Last-Rev: aebf3cd7ff0d77050659e9269f7eddaeff364eff GitHub-Pull-Request: golang/mobile#73 Reviewed-on: https://go-review.googlesource.com/c/mobile/+/351789 Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com> Reviewed-by: Hajime Hoshi <hajimehoshi@gmail.com> Trust: Hyang-Ah Hana Kim <hyangah@gmail.com> Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com> TryBot-Result: Go Bot <gobot@golang.org>
This commit is contained in:
parent
b5eb1abba0
commit
1c027f395e
|
@ -115,7 +115,7 @@ func (w *Writer) create(name string) (io.Writer, error) {
|
|||
}
|
||||
const fileHeaderLen = 30 // + filename + extra
|
||||
start := w.offset + fileHeaderLen + len(name)
|
||||
extra := start % 4
|
||||
extra := (-start) & 3
|
||||
|
||||
zipfw, err := w.w.CreateHeader(&zip.FileHeader{
|
||||
Name: name,
|
||||
|
|
Loading…
Reference in New Issue