Merge pull request #11306 from taosdata/fix/TD-14575

[TD-14575]<fix>: fix rtrim result not correct for nchar columns
This commit is contained in:
Ganlin Zhao 2022-04-08 10:44:04 +08:00 committed by GitHub
commit 5fd76a870e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -267,7 +267,7 @@ static void trtrim(char *input, char *output, int32_t type, int32_t charLen) {
numOfSpaces++;
}
} else { //NCHAR
for (int32_t i = charLen - 1; i < charLen; ++i) {
for (int32_t i = charLen - 1; i >= 0; --i) {
if (!iswspace(*((uint32_t *)varDataVal(input) + i))) {
break;
}