IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 43039


Ignore:
Timestamp:
Jun 1, 2026, 9:41:05 AM (7 weeks ago)
Author:
eugene
Message:

do not include the comma in a text-based field when reading a csv file

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-pstamp-20260421/Ohana/src/opihi/cmd.data/read_vectors.c

    r42389 r43039  
    310310              char *value = NULL;
    311311              if (IsCSV) {
    312                 char *end = parse_nextword_csv (ptr);
    313                 if (end) {
    314                   value = end ? strncreate (ptr, end - ptr) : strcreate (ptr);
    315                 }
     312                char *end = parse_nextword_csv (ptr); // parse_nextword_csv returns pointer to start of next word
     313                value = end ? strncreate (ptr, end - ptr - 1) : strcreate (ptr); // strip separating comma
    316314              } else {
    317315                value = thisword(ptr);
     
    329327              if (IsCSV) {
    330328                char *end = parse_nextword_csv (ptr);
    331                 if (end) {
    332                   value = end ? strncreate (ptr, end - ptr) : strcreate (ptr);
    333                 }
     329                value = end ? strncreate (ptr, end - ptr - 1) : strcreate (ptr); // strip separating comma
    334330              } else {
    335331                value = thisword(ptr);
Note: See TracChangeset for help on using the changeset viewer.