From 4fc65f846e7e0c3ce25bb08287a364588c751547 Mon Sep 17 00:00:00 2001 From: Samin Date: Mon, 29 Jul 2024 22:50:34 +0200 Subject: [PATCH] fix ReadCsv bug for string data --- src/runtime/local/io/utils.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/runtime/local/io/utils.h b/src/runtime/local/io/utils.h index 7016f4c95..53918853a 100644 --- a/src/runtime/local/io/utils.h +++ b/src/runtime/local/io/utils.h @@ -97,15 +97,12 @@ inline size_t setCString(const char * str, std::string *res,const char delim){ is_not_end -= (!is_multiLine && *(str + pos) == delim); } - // if str is the last column, then it do not end with a delim - if(is_not_end) pos--; - if(is_multiLine) res->append(str + 1, pos - 1); else res->append(str, pos); if(is_multiLine) pos++; - + return pos; }