From 8079532055525ffdc3509c9952cd9b7f6338954d Mon Sep 17 00:00:00 2001 From: Ganlin Zhao Date: Mon, 3 Apr 2023 17:58:43 +0800 Subject: [PATCH] fix: fix tsim crash on windows due to invalid input to strftime --- utils/test/c/tmqSim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/test/c/tmqSim.c b/utils/test/c/tmqSim.c index d81c70c65d..5eeb0aaa12 100644 --- a/utils/test/c/tmqSim.c +++ b/utils/test/c/tmqSim.c @@ -473,7 +473,7 @@ static char* shellFormatTimestamp(char* buf, int64_t val, int32_t precision) { struct tm ptm; if (taosLocalTime(&tt, &ptm) == NULL) { - sprintf(tt, "NaN"); + sprintf(buf, "NaN"); return buf; } size_t pos = strftime(buf, 35, "%Y-%m-%d %H:%M:%S", &ptm);