1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-16 09:29:32 +00:00

fix gcc warning

This commit is contained in:
paul moore 2023-12-01 16:17:42 -08:00
parent 39744f1bde
commit b7af5ac438

View File

@ -1112,8 +1112,8 @@ static StrBuf MakeLineFromTokens (TokNode* first)
SB_AppendStr (&T, token_string);
xfree (token_string);
} else if (token->Tok == TOK_INTCON) {
char ival[11]; // max size a long can be
snprintf (ival, 11, "%d", token->IVal);
char ival[12]; // max size a long can be
snprintf (ival, sizeof(ival), "%ld", token->IVal);
SB_AppendStr (&T, ival);
} else if ((token_string = GetTokenString (token)) != NULL)
{