mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2025-01-31 04:50:42 +00:00
Replace a few sprintf with Com_sprintf
This commit is contained in:
parent
e0a2100df5
commit
eaaaa6f5fc
3 changed files with 5 additions and 5 deletions
|
@ -346,7 +346,7 @@ int WriteFloat(FILE *fp, float value)
|
||||||
char buf[128];
|
char buf[128];
|
||||||
int l;
|
int l;
|
||||||
|
|
||||||
sprintf(buf, "%f", value);
|
Com_sprintf(buf, sizeof(buf), "%f", value);
|
||||||
l = strlen(buf);
|
l = strlen(buf);
|
||||||
//strip any trailing zeros
|
//strip any trailing zeros
|
||||||
while(l-- > 1)
|
while(l-- > 1)
|
||||||
|
|
|
@ -2382,7 +2382,7 @@ void Com_ReadCDKey( const char *filename ) {
|
||||||
char buffer[33];
|
char buffer[33];
|
||||||
char fbuffer[MAX_OSPATH];
|
char fbuffer[MAX_OSPATH];
|
||||||
|
|
||||||
sprintf(fbuffer, "%s/q3key", filename);
|
Com_sprintf(fbuffer, sizeof(fbuffer), "%s/q3key", filename);
|
||||||
|
|
||||||
FS_SV_FOpenFileRead( fbuffer, &f );
|
FS_SV_FOpenFileRead( fbuffer, &f );
|
||||||
if ( !f ) {
|
if ( !f ) {
|
||||||
|
@ -2412,7 +2412,7 @@ void Com_AppendCDKey( const char *filename ) {
|
||||||
char buffer[33];
|
char buffer[33];
|
||||||
char fbuffer[MAX_OSPATH];
|
char fbuffer[MAX_OSPATH];
|
||||||
|
|
||||||
sprintf(fbuffer, "%s/q3key", filename);
|
Com_sprintf(fbuffer, sizeof(fbuffer), "%s/q3key", filename);
|
||||||
|
|
||||||
FS_SV_FOpenFileRead( fbuffer, &f );
|
FS_SV_FOpenFileRead( fbuffer, &f );
|
||||||
if (!f) {
|
if (!f) {
|
||||||
|
@ -2447,7 +2447,7 @@ static void Com_WriteCDKey( const char *filename, const char *ikey ) {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
sprintf(fbuffer, "%s/q3key", filename);
|
Com_sprintf(fbuffer, sizeof(fbuffer), "%s/q3key", filename);
|
||||||
|
|
||||||
|
|
||||||
Q_strncpyz( key, ikey, 17 );
|
Q_strncpyz( key, ikey, 17 );
|
||||||
|
|
|
@ -518,7 +518,7 @@ void R_LevelShot( void ) {
|
||||||
float xScale, yScale;
|
float xScale, yScale;
|
||||||
int xx, yy;
|
int xx, yy;
|
||||||
|
|
||||||
sprintf( checkname, "levelshots/%s.tga", tr.world->baseName );
|
Com_sprintf(checkname, sizeof(checkname), "levelshots/%s.tga", tr.world->baseName);
|
||||||
|
|
||||||
source = ri.Hunk_AllocateTempMemory( glConfig.vidWidth * glConfig.vidHeight * 3 );
|
source = ri.Hunk_AllocateTempMemory( glConfig.vidWidth * glConfig.vidHeight * 3 );
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue