Skip to content

Commit 50f5988

Browse files
author
Sven Obser
committed
Use correct index when adding entry to subHeader array
1 parent 681eec3 commit 50f5988

File tree

1 file changed

+1
-1
lines changed
  • library/src/main/kotlin/kotlinx/serialization/csv/decode

1 file changed

+1
-1
lines changed

library/src/main/kotlin/kotlinx/serialization/csv/decode/CsvDecoder.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ internal abstract class CsvDecoder(
145145
if (childDesc.kind is StructureKind.CLASS) {
146146
reader.reset()
147147
headers[position] = nameIndex
148-
headers[position] = readHeaders(childDesc, "$prefix$name.")
148+
headers[nameIndex] = readHeaders(childDesc, "$prefix$name.")
149149
} else {
150150
reader.unmark()
151151
}

0 commit comments

Comments
 (0)