Removed 'FIX' and email from comments
This commit is contained in:
parent
1d8d5ec738
commit
d1f3d0bd6a
10
workbook.go
10
workbook.go
@ -86,7 +86,7 @@ func (wb *WorkBook) parseBof(buf io.ReadSeeker, b *bof, pre *bof, offset_pre int
|
|||||||
case 0x042: // CODEPAGE
|
case 0x042: // CODEPAGE
|
||||||
binary.Read(buf_item, binary.LittleEndian, &wb.Codepage)
|
binary.Read(buf_item, binary.LittleEndian, &wb.Codepage)
|
||||||
case 0x3c: // CONTINUE
|
case 0x3c: // CONTINUE
|
||||||
//FIX: sergeilem@gmail.com: step back if previous element not yet completed
|
// step back if previous element not yet completed
|
||||||
if wb.continue_utf16 > 0 {
|
if wb.continue_utf16 > 0 {
|
||||||
offset_pre--
|
offset_pre--
|
||||||
}
|
}
|
||||||
@ -124,8 +124,8 @@ func (wb *WorkBook) parseBof(buf io.ReadSeeker, b *bof, pre *bof, offset_pre int
|
|||||||
wb.sst = make([]string, info.Count)
|
wb.sst = make([]string, info.Count)
|
||||||
var size uint16
|
var size uint16
|
||||||
var i = 0
|
var i = 0
|
||||||
//FIX: sergeilem@gmail.com: initialize offset
|
// dont forget to initialize offset
|
||||||
offset = i
|
offset = 0
|
||||||
for ; i < int(info.Count); i++ {
|
for ; i < int(info.Count); i++ {
|
||||||
var err error
|
var err error
|
||||||
if err = binary.Read(buf_item, binary.LittleEndian, &size); err == nil {
|
if err = binary.Read(buf_item, binary.LittleEndian, &size); err == nil {
|
||||||
@ -199,13 +199,13 @@ func (w *WorkBook) get_string(buf io.ReadSeeker, size uint16) (res string, err e
|
|||||||
if flag&0x1 != 0 {
|
if flag&0x1 != 0 {
|
||||||
var bts = make([]uint16, size)
|
var bts = make([]uint16, size)
|
||||||
var i = uint16(0)
|
var i = uint16(0)
|
||||||
//FIX: sergeilem@gmail.com: we need local err here
|
// we need local err here
|
||||||
var err error
|
var err error
|
||||||
for ; i < size && err == nil; i++ {
|
for ; i < size && err == nil; i++ {
|
||||||
err = binary.Read(buf, binary.LittleEndian, &bts[i])
|
err = binary.Read(buf, binary.LittleEndian, &bts[i])
|
||||||
}
|
}
|
||||||
|
|
||||||
//FIX: sergeilem@gmail.com: dont append extra
|
// when eof found, we dont want to append last element
|
||||||
var runes []rune
|
var runes []rune
|
||||||
if err == io.EOF {
|
if err == io.EOF {
|
||||||
runes = utf16.Decode(bts[:i-1])
|
runes = utf16.Decode(bts[:i-1])
|
||||||
|
Loading…
Reference in New Issue
Block a user