extrame / xls

Pure Golang xls library
Apache License 2.0
329 stars 207 forks source link

when read rich or phonetic with EOF,then read it at next continue #45

Open gr258 opened 6 years ago

gr258 commented 6 years ago

In get_string function,when read rich or phonetic with EOF,the w.continue_rich and w.continue_apsb are not correct,it shout sub read count,then read the left count at next continue stream.

extrame commented 6 years ago

I dont't think this patch is acceptable, you can add your change but you can't remove the other feature like removing ver5 support and others

make sure just add something and don't affect others.

gr258 commented 6 years ago

I dont't know the meaning of "removing ver5 support".In the first "else" branch, the w.Is5ver is false, so the next "if w.Is5ver " is a dead code,that's why i remove this condition.

code: if w.Is5ver { var bts = make([]byte, size) _, err = buf.Read(bts) res = string(bts) } else { ...... if w.Is5ver { seek_size = int64(2 richtext_num) } else { seek_size = int64(4 richtext_num) } ......