bmx-ng / text.mod

Text Utilities
0 stars 3 forks source link

CSV header issue #6

Closed thareh closed 1 year ago

thareh commented 1 year ago

Hello,

TCsvHeader.Put() does not resize the field cols before inserting into it. (csv.bmx:285)

Perhaps change to something like this?

Method Put(col:String, index:Int)
    If cols.length < index+1
        cols = cols[..index+1]
    EndIf
    cols[index] = col
    map.Insert(col, New TInt(index))
End Method

Cheers!

woollybah commented 1 year ago

It shouldn't need to. It should already be large enough when the header instance is created?

woollybah commented 1 year ago

The bug is in ReadHeader() :) Thanks.