improve csv

This commit is contained in:
lixianjing 2023-12-06 09:59:15 +08:00
parent e83867781e
commit 6ebeb727b1
2 changed files with 4 additions and 0 deletions

View File

@ -2,6 +2,8 @@
2023/12/06
* fscript 增加 date\_time\_format
* 完善 fscript先找全局函数再找用户自定义的函数。
* 完善 csv 路径解析。
2023/12/05
* 完善fscript部分数学函数。

View File

@ -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);
}
}