Merge pull request #17000 from taosdata/fix/TD-19136
fix: fix nchar compare issue
This commit is contained in:
commit
75aea25970
|
@ -1115,7 +1115,7 @@ static bool compareVal(const char* v, const SStateKeys* pKey) {
|
||||||
if (varDataLen(v) != varDataLen(pKey->pData)) {
|
if (varDataLen(v) != varDataLen(pKey->pData)) {
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
return strncmp(varDataVal(v), varDataVal(pKey->pData), varDataLen(v)) == 0;
|
return memcmp(varDataVal(v), varDataVal(pKey->pData), varDataLen(v)) == 0;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return memcmp(pKey->pData, v, pKey->bytes) == 0;
|
return memcmp(pKey->pData, v, pKey->bytes) == 0;
|
||||||
|
|
Loading…
Reference in New Issue