mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-03-21 18:01:15 +00:00
[qflight] Replace a sprintf with va
While 16 chars is plenty for a 32-bit int, just seeing sprintf is enough reason to make the change.
This commit is contained in:
parent
fe63d93e8e
commit
1891c1c302
1 changed files with 2 additions and 5 deletions
|
@ -125,7 +125,7 @@ MatchTargets (void)
|
|||
// set the style on the source ent for switchable lights
|
||||
if (entities[j].style) {
|
||||
entities[i].style = entities[j].style;
|
||||
SetKeyValue (&entities[i], "style", va (0, "%i",
|
||||
SetKeyValue (&entities[i], "style", va (0, "%d",
|
||||
entities[i].style));
|
||||
}
|
||||
|
||||
|
@ -334,12 +334,9 @@ LoadEntities (void)
|
|||
if (entity->classname && !strcmp (entity->classname, "light")) {
|
||||
if (entity->targetname && entity->targetname[0]
|
||||
&& !entity->style) {
|
||||
char s[16];
|
||||
|
||||
entity->style = LightStyleForTargetname (entity->targetname,
|
||||
true);
|
||||
sprintf (s, "%i", entity->style);
|
||||
SetKeyValue (entity, "style", s);
|
||||
SetKeyValue (entity, "style", va (0, "%d", entity->style));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue