提交 4d03fd0b 编写于 作者: Z zhaoyanggh

Merge branch 'fix/TS-165' of https://github.com/taosdata/TDengine into fix/TS-165

...@@ -2700,7 +2700,7 @@ void tscDequoteAndTrimToken(SStrToken* pToken) { ...@@ -2700,7 +2700,7 @@ void tscDequoteAndTrimToken(SStrToken* pToken) {
// trim leading spaces // trim leading spaces
while (first < last) { while (first < last) {
char c = pToken->z[first]; char c = pToken->z[first];
if (isspace(c)) { if (c != ' ' && c != '\t') {
break; break;
} }
first++; first++;
...@@ -2709,7 +2709,7 @@ void tscDequoteAndTrimToken(SStrToken* pToken) { ...@@ -2709,7 +2709,7 @@ void tscDequoteAndTrimToken(SStrToken* pToken) {
// trim ending spaces // trim ending spaces
while (first < last) { while (first < last) {
char c = pToken->z[last - 1]; char c = pToken->z[last - 1];
if (isspace(c)) { if (c != ' ' && c != '\t') {
break; break;
} }
last--; last--;
......
...@@ -223,7 +223,7 @@ char *paGetToken(char *string, char **token, int32_t *tokenLen) { ...@@ -223,7 +223,7 @@ char *paGetToken(char *string, char **token, int32_t *tokenLen) {
char quote = 0; char quote = 0;
while (*string != 0) { while (*string != 0) {
if (isspace(*string)) { if (*string == ' ' || *string == '\t') {
++string; ++string;
} else { } else {
break; break;
...@@ -244,12 +244,12 @@ char *paGetToken(char *string, char **token, int32_t *tokenLen) { ...@@ -244,12 +244,12 @@ char *paGetToken(char *string, char **token, int32_t *tokenLen) {
break; break;
} }
if (*string == '#' || isspace(*string)) { if (*string == '#' || *string == '\n' || *string == '\r') {
*string = 0; *string = 0;
break; break;
} }
if (isspace(*string) && !quote) { if ((*string == ' ' || *string == '\t') && !quote) {
break; break;
} else { } else {
++string; ++string;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册