From cc1bc9304a087f97dfba14ab5b223c5a6f2fa556 Mon Sep 17 00:00:00 2001 From: dapan1121 Date: Tue, 28 Feb 2023 13:23:59 +0800 Subject: [PATCH] fix: trace id two character missing issue --- include/util/ttrace.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/util/ttrace.h b/include/util/ttrace.h index 5cdb1eecaa..e672882f57 100644 --- a/include/util/ttrace.h +++ b/include/util/ttrace.h @@ -59,11 +59,13 @@ typedef struct STraceId { char* _t = _buf; \ _t[0] = '0'; \ _t[1] = 'x'; \ - _t += titoa(rootId, 16, &_t[2]); \ + _t += 2; \ + _t += titoa(rootId, 16, &_t[0]); \ _t[0] = ':'; \ _t[1] = '0'; \ _t[2] = 'x'; \ - _t += titoa(msgId, 16, &_t[3]); \ + _t += 3; \ + _t += titoa(msgId, 16, &_t[0]); \ } while (0) #ifdef __cplusplus -- GitLab