20
0

Merge 46b1dcb078e98a14c99bb80984a96b699e68c5d4 into 4a6cf263071b975a90abf74ca3e804b48243be28

This commit is contained in:
Nikhil Bhargava 2020-04-26 20:48:35 +08:00 committed by GitHub
commit 5afd85a7da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -226,15 +226,13 @@ func (w *WorkBook) get_string(buf io.ReadSeeker, size uint16) (res string, err e
res = string(runes)
}
if richtext_num > 0 {
var bts []byte
var seek_size int64
if w.Is5ver {
seek_size = int64(2 * richtext_num)
} else {
seek_size = int64(4 * richtext_num)
}
bts = make([]byte, seek_size)
err = binary.Read(buf, binary.LittleEndian, bts)
_, err = buf.Seek(seek_size, io.SeekCurrent)
if err == io.EOF {
w.continue_rich = richtext_num
}
@ -242,9 +240,7 @@ func (w *WorkBook) get_string(buf io.ReadSeeker, size uint16) (res string, err e
// err = binary.Read(buf, binary.LittleEndian, bts)
}
if phonetic_size > 0 {
var bts []byte
bts = make([]byte, phonetic_size)
err = binary.Read(buf, binary.LittleEndian, bts)
_, err = buf.Seek(int64(phonetic_size), io.SeekCurrent)
if err == io.EOF {
w.continue_apsb = phonetic_size
}