From 82fe13876f4e1ad3c807532e4a4ec9e235dadb8e Mon Sep 17 00:00:00 2001 From: fengzero Date: Wed, 17 May 2023 10:01:45 +0000 Subject: [PATCH] chore(log): limit string length --- include/neuron/type.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/neuron/type.h b/include/neuron/type.h index 9f27cc72..94a8f7f1 100644 --- a/include/neuron/type.h +++ b/include/neuron/type.h @@ -179,8 +179,9 @@ static inline char *neu_value_str(neu_type_e type, neu_value_u value) value.boolean); break; case NEU_TYPE_STRING: { - snprintf(str, sizeof(str), "type: %s, value: %s", neu_type_string(type), - value.str); + snprintf(str, sizeof(str), "type: %s, value: %c%c%c", + neu_type_string(type), value.str[0], value.str[1], + value.str[2]); break; } default: