From 898223162ed18d67d6af31ce0ec692278c1d9e55 Mon Sep 17 00:00:00 2001 From: hao Date: Wed, 29 Jun 2016 14:52:59 +0800 Subject: [PATCH] Update workbook.go fix bug:use invalid size to alloc memory when read big document --- workbook.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/workbook.go b/workbook.go index 2a74fa3..865e1b4 100644 --- a/workbook.go +++ b/workbook.go @@ -204,11 +204,12 @@ func (w *WorkBook) get_string(buf io.ReadSeeker, size uint16) (res string, err e } err = binary.Read(buf, binary.LittleEndian, bts) } - if flag&0x4 != 0 { - var bts []byte - bts = make([]byte, phonetic_size) - err = binary.Read(buf, binary.LittleEndian, bts) - } + + //if flag&0x4 != 0 { + // var bts []byte + // bts = make([]byte, phonetic_size) + // err = binary.Read(buf, binary.LittleEndian, bts) + //} } return }