diff --git a/src/kit/taosdemo/taosdemo.c b/src/kit/taosdemo/taosdemo.c index 6513f3e214d4c16ebf86ecdbb9ff1ca3debe0f59..9f300102df9355a8c82ead6b14c882c82cf77933 100644 --- a/src/kit/taosdemo/taosdemo.c +++ b/src/kit/taosdemo/taosdemo.c @@ -5122,13 +5122,13 @@ static int32_t generateStbDataTail( } else { lenOfRow = getRowDataFromSample( data, - remainderBufLen < MAX_DATA_SIZE ? remainderBufLen : MAX_DATA_SIZE, + (remainderBufLen < MAX_DATA_SIZE)?remainderBufLen:MAX_DATA_SIZE, startTime + superTblInfo->timeStampStep * k, superTblInfo, pSamplePos); } - if (lenOfRow > remainderBufLen) { + if ((lenOfRow + 1) > remainderBufLen) { break; }