Browse Source

engine: fix extra zeros in %0

pull/2/head
Alibek Omarov 5 years ago
parent
commit
4a56dfcd00
  1. 4
      engine/client/cl_cmds.c
  2. 2
      engine/client/cl_demo.c
  3. 2
      engine/server/sv_save.c

4
engine/client/cl_cmds.c

@ -153,7 +153,7 @@ qboolean CL_ScreenshotGetName( int lastnum, char *filename )
return false; return false;
} }
Q_sprintf( filename, "scrshots/%s_shot%0004d.png", clgame.mapname, lastnum ); Q_sprintf( filename, "scrshots/%s_shot%04d.png", clgame.mapname, lastnum );
return true; return true;
} }
@ -172,7 +172,7 @@ qboolean CL_SnapshotGetName( int lastnum, char *filename )
return false; return false;
} }
Q_sprintf( filename, "../%s_%0004d.png", clgame.mapname, lastnum ); Q_sprintf( filename, "../%s_%04d.png", clgame.mapname, lastnum );
return true; return true;
} }

2
engine/client/cl_demo.c

@ -1311,7 +1311,7 @@ static void CL_DemoGetName( int lastnum, char *filename )
return; return;
} }
Q_sprintf( filename, "demo%0004d", lastnum ); Q_sprintf( filename, "demo%04d", lastnum );
} }
/* /*

2
engine/server/sv_save.c

@ -2090,7 +2090,7 @@ void SV_SaveGame( const char *pName )
// scan for a free filename // scan for a free filename
for( n = 0; n < 1000; n++ ) for( n = 0; n < 1000; n++ )
{ {
Q_snprintf( savename, sizeof( savename ), "save%003d", n ); Q_snprintf( savename, sizeof( savename ), "save%03d", n );
if( !FS_FileExists( va( "%s%s.sav", DEFAULT_SAVE_DIRECTORY, savename ), true )) if( !FS_FileExists( va( "%s%s.sav", DEFAULT_SAVE_DIRECTORY, savename ), true ))
break; break;

Loading…
Cancel
Save