Skip to content

Commit bf1f540

Browse files
committed
quote values when generating CSV
1 parent 39cfafc commit bf1f540

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/AdafruitIO_Data.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -364,8 +364,9 @@ char* AdafruitIO_Data::toCSV()
364364

365365
memset(_csv, 0, AIO_CSV_LENGTH);
366366

367-
strcpy(_csv, _value);
368-
strcat(_csv, ",");
367+
strcpy(_csv, "\"");
368+
strcat(_csv, _value);
369+
strcat(_csv, "\",");
369370
strcat(_csv, charFromDouble(_lat));
370371
strcat(_csv, ",");
371372
strcat(_csv, charFromDouble(_lon));

0 commit comments

Comments
 (0)