diff --git a/source/common/src/tmsg.c b/source/common/src/tmsg.c index 7a087c450e..6da5200749 100644 --- a/source/common/src/tmsg.c +++ b/source/common/src/tmsg.c @@ -6910,14 +6910,14 @@ int32_t tDecodeSTqOffset(SDecoder *pDecoder, STqOffset *pOffset) { } int32_t tEncodeMqVgOffset(SEncoder* pEncoder, const SMqVgOffset* pOffset) { - if (tEncodeI64(pEncoder, pOffset->consumerId) < 0) return -1; if (tEncodeSTqOffset(pEncoder, &pOffset->offset) < 0) return -1; + if (tEncodeI64(pEncoder, pOffset->consumerId) < 0) return -1; return 0; } int32_t tDecodeMqVgOffset(SDecoder* pDecoder, SMqVgOffset* pOffset) { - if (tDecodeI64(pDecoder, &pOffset->consumerId) < 0) return -1; if (tDecodeSTqOffset(pDecoder, &pOffset->offset) < 0) return -1; + if (tDecodeI64(pDecoder, &pOffset->consumerId) < 0) return -1; return 0; }