PY_EXT: fix wrong column header produced by csv_write_by_string.
authorEdouard Tisserant <edouard@beremiz.fr>
Fri, 07 Feb 2025 14:29:11 +0100 (5 weeks ago)
changeset 4107 d317b2ee46ef
parent 4106 6a82b8b7564b
child 4108 0e0776f5459f
PY_EXT: fix wrong column header produced by csv_write_by_string.
py_ext/py_ext_rt.py
--- a/py_ext/py_ext_rt.py	Fri Feb 07 11:22:53 2025 +0100
+++ b/py_ext/py_ext_rt.py	Fri Feb 07 14:29:11 2025 +0100
@@ -267,7 +267,7 @@
     except KeyError:
         # adjust col headers content
         first_row = data[0] 
-        first_row += [""]*(max_row_len - len(first_row)) + [rowname]
+        first_row += [""]*(max_row_len - len(first_row)) + [colname]
         # create a new column
         colidx = col_headers[colname] = max_row_len
         max_row_len = max_row_len + 1