Skip to content

Commit

Permalink
improve csv
Browse files Browse the repository at this point in the history
  • Loading branch information
xianjimli committed Dec 6, 2023
1 parent e838677 commit 6ebeb72
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

2023/12/06
* fscript 增加 date\_time\_format
* 完善 fscript,先找全局函数,再找用户自定义的函数。
* 完善 csv 路径解析。

2023/12/05
* 完善fscript部分数学函数。
Expand Down
2 changes: 2 additions & 0 deletions src/csv/csv_file_object.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,12 @@ static ret_t csv_path_parse(csv_path_t* path, csv_file_t* csv, const char* name)
}

if (*p == '[') {
return_value_if_fail(tk_isdigit(p[1]), RET_BAD_PARAMS);
path->col = tk_atoi(p + 1);
} else {
path->col = csv_file_get_col_of_name(csv, p);
if (path->col < 0) {
return_value_if_fail(tk_isdigit(p[0]), RET_BAD_PARAMS);
path->col = tk_atoi(p);
}
}
Expand Down

0 comments on commit 6ebeb72

Please sign in to comment.