T++ CSVs do not have headers, don't try to read 'em

This commit is contained in:
Snowdream 2022-07-25 05:32:31 -04:00 committed by Nathan-MV
parent ab2f477031
commit d4bf2123a9

View file

@ -703,7 +703,7 @@ RB_METHOD(mkxpParseCSV) {
VALUE ret = rb_ary_new();
std::stringstream stream(RSTRING_PTR(str));
try {
rapidcsv::Document doc(stream, rapidcsv::LabelParams(), rapidcsv::SeparatorParams(',', false, true, true, true));
rapidcsv::Document doc(stream, rapidcsv::LabelParams(-1,-1), rapidcsv::SeparatorParams(',', false, true, true, true));
for (int r = 0; r < doc.GetRowCount(); r++) {
VALUE col = rb_ary_new();
for (int c = 0; c < doc.GetColumnCount(); c++) {