Skip to content
Snippets Groups Projects
Commit 1fe68664 authored by rswindell's avatar rswindell
Browse files

Address warning: ‘__builtin___sprintf_chk’ writing a terminating nul past the...

Address warning: ‘__builtin___sprintf_chk’ writing a terminating nul past the end of the destination
reported by Nelgin via irc.
parent dea1e16b
Branches
Tags
No related merge requests found
// $Id$
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
...@@ -27,7 +29,7 @@ AvatarColor(int col) ...@@ -27,7 +29,7 @@ AvatarColor(int col)
char * char *
PCBoardColor(int col) PCBoardColor(int col)
{ {
static char a[4]; static char a[5];
if (col == oldColor) if (col == oldColor)
return NULL; return NULL;
sprintf(a, "@X%02x", col); sprintf(a, "@X%02x", col);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment