Use xsprintf instead of sprintf.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4124 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -1,15 +1,15 @@
|
|||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* anonname.c */
|
/* anonname.c */
|
||||||
/* */
|
/* */
|
||||||
/* Create names for anonymous variables/types */
|
/* Create names for anonymous variables/types */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* (C) 2000 Ullrich von Bassewitz */
|
/* (C) 2000-2009, Ullrich von Bassewitz */
|
||||||
/* Wacholderweg 14 */
|
/* Roemerstrasse 52 */
|
||||||
/* D-70597 Stuttgart */
|
/* D-70794 Filderstadt */
|
||||||
/* EMail: uz@cc65.org */
|
/* EMail: uz@cc65.org */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* This software is provided 'as-is', without any expressed or implied */
|
/* This software is provided 'as-is', without any expressed or implied */
|
||||||
@@ -36,8 +36,12 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
/* common */
|
||||||
|
#include "xsprintf.h"
|
||||||
|
|
||||||
/* cc65 */
|
/* cc65 */
|
||||||
#include "anonname.h"
|
#include "anonname.h"
|
||||||
|
#include "ident.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -63,7 +67,7 @@ char* AnonName (char* Buf, const char* Spec)
|
|||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
static unsigned ACount = 0;
|
static unsigned ACount = 0;
|
||||||
sprintf (Buf, "%s-%s-%04X", AnonTag, Spec, ++ACount);
|
xsprintf (Buf, IDENTSIZE, "%s-%s-%04X", AnonTag, Spec, ++ACount);
|
||||||
return Buf;
|
return Buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user