add null terminator after fc_itoa

use_iouring
YuQing 2025-08-05 21:14:45 +08:00
parent e4898affdd
commit 1d2f938a30
1 changed files with 2 additions and 0 deletions

View File

@ -3234,6 +3234,7 @@ const char *int2str(const int n, char *buff, const bool thousands_separator)
{
int len;
len = fc_itoa(n, buff);
*(buff + len) = '\0';
if (thousands_separator)
{
add_thousands_separator(buff, len);
@ -3245,6 +3246,7 @@ const char *long2str(const int64_t n, char *buff, const bool thousands_separator
{
int len;
len = fc_itoa(n, buff);
*(buff + len) = '\0';
if (thousands_separator)
{
add_thousands_separator(buff, len);