Kill a sprintf.

While 16 chars is enough for any 32-bit int, if int ever changes to 64
bit... (need 21). Just avoid the issue with good old va :)
This commit is contained in:
Bill Currie 2012-12-31 14:37:39 +09:00
parent d2909cd4dd
commit 32127d3ec7

View file

@ -53,6 +53,7 @@
#include "QF/quakefs.h"
#include "QF/script.h"
#include "QF/sys.h"
#include "QF/va.h"
#include "light.h"
#include "threads.h"
@ -122,11 +123,8 @@ MatchTargets (void)
}
// set the style on the source ent for switchable lights
if (entities[j].style) {
char s[16];
entities[i].style = entities[j].style;
sprintf (s, "%i", entities[i].style);
SetKeyValue (&entities[i], "style", s);
SetKeyValue (&entities[i], "style", va ("%i", entities[i].style));
}
if (entities[i].spotcone >= 0) {