Browse Source

Fixed populating headers. Fixes #6.

Brucey 2 years ago
parent
commit
115ceeb898
1 changed files with 1 additions and 1 deletions
  1. 1 1
      csv.mod/csv.bmx

+ 1 - 1
csv.mod/csv.bmx

@@ -71,8 +71,8 @@ Type TCsvParser
 
 
 	Method ReadHeader()
 	Method ReadHeader()
 		If NextRow() = ECsvStatus.row Then
 		If NextRow() = ECsvStatus.row Then
-			Local header:TCsvHeader = New TCsvHeader()
 			Local count:Int = row.ColumnCount()
 			Local count:Int = row.ColumnCount()
+			Local header:TCsvHeader = New TCsvHeader(count)
 			For Local i:Int = 0 Until count
 			For Local i:Int = 0 Until count
 				Local col:SCsvColumn = row.GetColumn(i)
 				Local col:SCsvColumn = row.GetColumn(i)
 				Local v:String = col.GetValue()
 				Local v:String = col.GetValue()