diff --git a/source/libs/executor/src/scanoperator.c b/source/libs/executor/src/scanoperator.c index 3d2eef66ea38201277385f9174f9296db65e5fa1..37f1ea597db7f99d6bb4ae389c3e742b58b09b77 100644 --- a/source/libs/executor/src/scanoperator.c +++ b/source/libs/executor/src/scanoperator.c @@ -1986,7 +1986,10 @@ void streamScanOperatorDecode(void* pBuff, int32_t len, SStreamScanInfo* pInfo) } void* buf = pBuff; buf = decodeSTimeWindowAggSupp(buf, &pInfo->twAggSup); - int32_t tlen = len - ((char *)pBuff - (char *)buf); // fix windows compile error + int32_t tlen = len - encodeSTimeWindowAggSupp(NULL, &pInfo->twAggSup); + if (tlen == 0) { + return; + } void* pUpInfo = taosMemoryCalloc(1, sizeof(SUpdateInfo)); int32_t code = pInfo->stateStore.updateInfoDeserialize(buf, tlen, pUpInfo);